This question is locked. New answers and comments are not allowed.
I have an AJAX-bound MVC Grid that displays 200 rows of data per page across a set of columns.
By default only 7 columns are visible, but the user can select which columns should be included in the grid from the set of about 25. I don't use column menus, but rather my own UI and call grid.hideColumn() and grid.showColumn() directly.
I've encountered a serious performance problem: operation of hiding or showing a column takes several seconds, per each column that is shown or hidden. I was able to fix the issue for showing columns only, by setting
Unfortunately the same solution is not possible when hiding columns. For some reason, when grid is hidden and shown again around the operation of hiding a column, the change has no effect (the column remains in the grid).
Any ideas how to fix that?
Thanks
By default only 7 columns are visible, but the user can select which columns should be included in the grid from the set of about 25. I don't use column menus, but rather my own UI and call grid.hideColumn() and grid.showColumn() directly.
I've encountered a serious performance problem: operation of hiding or showing a column takes several seconds, per each column that is shown or hidden. I was able to fix the issue for showing columns only, by setting
display
:
none
;
for the whole grid just before the loop that shows & hides the columns executes, and then showing the grid back after all changes are done. This cut the time of about 2-3 seconds per column to almost instant for the whole set. That would suggest the cause of problem lies in the amount of DOM manipulation happening behind the scenes.Unfortunately the same solution is not possible when hiding columns. For some reason, when grid is hidden and shown again around the operation of hiding a column, the change has no effect (the column remains in the grid).
Any ideas how to fix that?
Thanks