Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Image column not resizing correctly
posted

I have an UltraWinGrid bound to a DataTable. There is an unbound column as well. When I click a button in my app, I add a row to this DataTable, and set the following 2 properties for the unbound column:
     gridRow.Cells["DELETE"].Appearance.Image = Properties.Resources.About16;
     gridRow.Cells[
"DELETE"].Appearance.ImageHAlign = HAlign.Center;

Then I call this:
     grid.DisplayLayout.Bands[0].Columns["DELETE"].PerformAutoResize(PerformAutoSizeType.VisibleRows);

I am attaching a screenshots for BEFORE and AFTER. I would like the column to resize to fit the size of the image, no more, no less. However, as you can see from the BEFORE that doesn't happen right away. If I click the button again to add another row, then it resizes properly (see AFTER). Is this a timing issue? If so, what event should I put the resize call in?

Thanks in advance!

Parents Reply Children
No Data