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
420
Column AutoPerformResize donot shrink properly
posted

Hi

After Editing cell values i want to resize grid columns based on cell values. my code:

 

foreach (UltraGridColumn col in grid.DisplayLayout.Bands[0].Columns)

{

     col.PerformAutoResize();

}

When current cell value is bigger than pervious value its Grows properly but When current cell value is smaller than previous value it donot shrink, it keeps *Row Height as it is. ( Row Height - becoz Column's CellMultiline is True)

 

 

 

Parents
  • 469350
    Offline posted

    Hi,

    I'm having a hard time understanding your question. How does autosizing the column relate to the height of the row? This code will never change the row height either bigger or smaller. If you want to auto-resize the rows, then you should use the PerformAutoSize method on the row.

    BTW, the code you have here will only autosize the columns based on the visible cells in the grid. That is - the cells that are scrolled into view. You might want to consider using one of the other overloads of PerformAutoResize to include all of the rows.

Reply Children