ExtJS grid save cookies for show/hide columns
I have a gridPanel object and I need to save the column configuration in cookies.
This is my source:
var cp = new Ext.state.CookieProvider({
expires: new Date(new Date().getTime()+(1000*60*60*24*30)) //30 days
});
Ext.state.Manager.setProvider(cp);
// create the Grid
var m_grid = new Ext.grid.GridPanel({
.............
stateful: true,
stateEvents: ['columnresize', 'columnmove', 'show', 'hide']
});
Every state event cookie is saved fine except for data about hidden/shown columns. What events should I use? Any help appreciated.
Restore stateful Grid Columns on click of a button
Hi,
In a grid Panel, i would like to have a button "Restore Default" clicking on which it should remove columns which are hided and saved in the cookies and refresh the Grid back to the original state. Can anyone tell me how can i do this?