PDA

View Full Version : How to hide gridpanel columns ?



Vikram
20 Feb 2014, 11:02 AM
I tried with to hide columns as below:


Ext.ComponentQuery.query('#email')[0].show();
or

gridPanel.columns[14].show();

but hiding one column its working fine but in case of multiple columns more than 3 its hanged and sometimes have to kill the page ...

any suggestion and help would be appreciated.

Thanks & Regards
vik

scottmartin
20 Feb 2014, 2:25 PM
It would help to see your code. The call should not break unless you are trying to access a bad column.

You can also use reconfigure if you have a lot of columns:
https://fiddle.sencha.com/#fiddle/2r1

skirtle
20 Feb 2014, 9:22 PM
If you're hiding multiple columns at once you should suspend layouts:


Ext.suspendLayouts();

// Hide columns

Ext.resumeLayouts(true);

I'm not sure this will help if it's hanging but it should improve performance.

Vikram
27 Mar 2014, 7:19 AM
Hello skirtle,

thanks for reply but your below approach did't work for me.



Ext.suspendLayouts(); // Hide columns Ext.resumeLayouts(true);

scottmartin
27 Mar 2014, 7:57 AM
As mentioned, you would need to show your code.