PDA

View Full Version : GridPanel performance on show/hide columns



v.madhu
15 Nov 2009, 9:17 PM
Hi,
Currently i have 50 columns in the Editor Gridpanel.
In some cases i am hidding 5 columns at a time using the following code.


grid.getColumnModel().setHidden(24, true);
grid.getColumnModel().setHidden(25, true);
grid.getColumnModel().setHidden(26, true);
grid.getColumnModel().setHidden(27, true);
grid.getColumnModel().setHidden(28, true);Now the problem is, it is taking 5 seconds to hide or show columns.
Is it possible to improve the performance?
Also please tell this performance issue wont be reproduced in the licensed version of extJS?

Condor
16 Nov 2009, 12:26 AM
grid.getColumnModel().setConfig(newConfig) will only refresh the grid once instead of for each column.

(using setConfig you could even remove the columns instead of hiding them)