Grid does not automatically save and restore state. What am I doing wrong?
I have an Ext 3.4 grid with stateful:true, a stateId, and each column in the column model has an id.
Yet when I resize columns I don't see any state cookie saved, and the column widths are not restored when the page is reloaded.
I do have a state Manager with cookie provider defined and I can set/get cookie values via the state manager just fine.
I also added handlers for beforestatesave and statesave and they are being called, but still - no cookie is saved and no state restored. Those handlers are being passed the correct arguments as well - the columns argument show correct updated widths when dumped into the console.
My question is: am I doing something wrong? Should I not expect this to be automatic?
Do I actually have to use those state events to manually save and restore state?
Does the state management work for you using our online example?
Yes the example works fine for me...
My grid seems to be storing the state fine, but the event to restore the object to its last state is not being fired.
Sencha Premium Member
I have the same problem and I'm using 6.0.1.
I've set stateful=true on the grid and set unique stateId values on the grid and its columns. It's saving the state but not restoring it. I see beforestatesave and statesave events being fired but not beforestaterestore and staterestore. Isn't this supposed to be automatic?
Tags for this Thread