Posted 8 September 2017, 1:14 pm ESTHello,
I would need some hints to optimize my grid column resizing.
Initially, I used the GetPreferredColumnWidth() method to resize automatically the columns when inserting sets of rows.
Problem: when the grid becomes huge (50-60 columns), resizing gets very long. So, I tried to solve this problem, by attaching objects (column descriptors) to the columns (with the TAG property). These objects provide for example, a GetPreferredWidth() retrieving some default column width for columns that do not need width calculations (i.e.: columns with fixed width image cells, etc...).
For the other columns having text cells, the GetPreferredColumnWidth() is still used. I am still trying to find a way to optimize the resizing cycle ...
I would like to know something: if you have 100 rows in the grid, and you add 50 new rows, does the GetPreferredColumnWidth() recompute the whole cells widths or does it recalculate the width of the new added cells to adapt the column width accordingly ? Could I try to handle the problem by forcing the column to resize only in one direction (stretch direction) ?
Hoping my question is clear.
Thank you for your help.