-
22 Nov 2012 11:40 PM #1
Answered: Reset/clear grid completely
Answered: Reset/clear grid completely
Hi,
How do we reset a grid completely? I tried,
It doesn't remove column header in the grid. Is there any other way?Code:Ext.getCmp('grid_id').getStore().removeAll();
Thanks in advance!
-
Best Answer Posted by sencha.user
I did it myself hyding the whole grid when not necessary,
Code:Ext.get('grid_id').hide();
-
23 Nov 2012 12:01 AM #2
depends on what you mean by reset and what you want to do with it after reset. the reconfigure method of the grid might do the work for you:
http://docs.sencha.com/ext-js/4-0/#!...od-reconfigure
you can pass no store and an empty columns array. the title and other configs of the grid would remain as it is i would guess.
-
23 Nov 2012 12:02 AM #3
I did it myself hyding the whole grid when not necessary,
Code:Ext.get('grid_id').hide();
-
23 Nov 2012 12:04 AM #4
Hi Farish,
I tried that, since the columns are set initially in run time, column headers are not getting removed. Thanks for your input
.


Reply With Quote