1. #1
    Sencha User
    Join Date
    Sep 2009
    Location
    London
    Posts
    54
    Vote Rating
    1
    harel is on a distinguished road

      0  

    Default Grid does not automatically save and restore state. What am I doing wrong?

    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?

    Thanks
    Harel

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,081
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Does the state management work for you using our online example?
    http://dev.sencha.com/deploy/ext-4.1...rray-grid.html

    Scott.

  3. #3
    Sencha User
    Join Date
    Sep 2009
    Location
    London
    Posts
    54
    Vote Rating
    1
    harel is on a distinguished road

      0  

    Default


    Yes the example works fine for me...

  4. #4
    Sencha User
    Join Date
    Sep 2013
    Posts
    29
    Vote Rating
    1
    mwilliamsShields is on a distinguished road

      0  

    Default


    My grid seems to be storing the state fine, but the event to restore the object to its last state is not being fired.

Thread Participants: 2

Tags for this Thread