vStyle
19 Jan 2011, 10:32 PM
Hi there,
I have set the following gridPanel/columnModel listeners: (columnmoved, hiddenchange, columnresize, sortchange) and save all grid changes in cookies, then on page reload I set saved options back. All works great.
Also I have add new button to bbar named 'Restore Grid Configs', I wish to restore columnModel by default clicking on this button.
What I do:
1. Save current configs before change them based on cookie entries.
var savedConfigs = grid.initialConfig;2. Set saved configs on my button click
columnModel.setConfig(savedConfigs);This way works bad and hide whole column model :(
Is there any good method to restore grid/columnModel?
Thanks
John
I have set the following gridPanel/columnModel listeners: (columnmoved, hiddenchange, columnresize, sortchange) and save all grid changes in cookies, then on page reload I set saved options back. All works great.
Also I have add new button to bbar named 'Restore Grid Configs', I wish to restore columnModel by default clicking on this button.
What I do:
1. Save current configs before change them based on cookie entries.
var savedConfigs = grid.initialConfig;2. Set saved configs on my button click
columnModel.setConfig(savedConfigs);This way works bad and hide whole column model :(
Is there any good method to restore grid/columnModel?
Thanks
John