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
50
UltraGrid PerformAutoResize Inconsistent 'Non-smart' Resizing
posted

We're currently having issues getting a grid to format columns correctly.

Given a dataset loaded into an UltraGrid, executing the line

"anUltraGrid.DisplayLayout.PerformAutoResizeColumns(false, PerformAutoSizeType.VisibleRows, true);"

doesn't work as expected. Header AND Cell data is cutoff or made too short, causing wrapping. We KNOW it's possible to fit all column and header text without anything getting cut off because we accomplish it manually resizing the columns ourselves.

Here's an example of how it looks AFTER running the autoResize, a grid we can fix manually:

/community/resized-image/__size/320x240/__key/communityserver-discussions-components-files/1040/ForInfragisticsBadAutosizeExample.png

Control Settings:

/community/resized-image/__size/320x240/__key/communityserver-discussions-components-files/1040/ForInfragisticsBadAutosizeControlSettings.png

Parents
No Data
Reply
  • 469350
    Offline posted

    This could be a timing issue. You are only sizing the VisibleRows, so if this code is in the Form_Load, for example, it will do nothing, as no rows are visible in the grid at that point since the grid has not yet painted. It might be a simple matter of changing this code to use PerformAutoSizeType.AllRowsInBand. This is a better option, anyway, unless you have a tremendous number of rows in your grid and this therefore causes a performance hit. 

    Or you could try moving this code to another event that occurs later. You might want to try putting this code into a button click just as a test to see if it's a timing issue. 

Children