Categories | Question details Back To List | ||
We have a Grid (actually a TreeGrid) with a number of columns (~50) where we want to show/hide the columns according to expanding/collapsing some column groups, so we call setColHidden(...) with a new set of true/false values for the columns each time we want to expand/collapse a column group. However, this is extremely slow when the number of rows is only moderately large (30 seconds when using 150 rows with 50 columns).
Is there are faster way to show/hide columns (for example, by copying the grid data to a new grid initialized with the columns to show/hide and replacing the old grid with the new grid) than using setColHidden()?
Answer posted on May 30, 2007 19:43 The setColumnHidden is time consuming operation , becuase it require updating all rows in grid, but the using few such commands one by one even more time consuming, because each time it is separate update. As far as I can see there is no any fast way to do such operation. Initially grid was designed to work with vertical sets ( few columns, many rows ) and setColumnHidden functionality was added as rare used extension, it was not purposed for such usage. Please send an example of your xml file, which you are use in described situation, to dhtmlx@scand.com, I will check how code can be optimized, but in any case it will not be much faster. Answer posted by Inga (Support) on Dec 03, 2014 16:58 Having solved the problem mentioned above, you may also look through the possible related problems with html5 javascript library and dhtml tree menu. |