PDA

View Full Version : stateful grid state restore without reloading web page



mysticav
31 Oct 2013, 9:08 PM
Hi,

Using: Ext 4.2.1

I have a grid with stateful: true, stateId: "mygrid"
It works. I can reload the web page and the column positions are kept on their custom position as expected.

But I'm using the single page application approach, so the page should never reloaded (no need).

The problem is that if I destroy that grid and I render it again, the columns go back to their default position.

So only refreshing the page makes it work.

Any idea ?

I'm using this provider on application launch:
Ext.state.Manager.setProvider(new Ext.state.LocalStorageProvider());

Thanks.

mysticav
31 Oct 2013, 9:18 PM
Found the solution.

I needed to define stateId on each column as well.

Gary Schlosberg
1 Nov 2013, 5:21 AM
Glad to hear you figured it out, and thanks for taking the time to post the solution for the community.