Results 1 to 2 of 2

Thread: How to reset paging config

  1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    11
    Vote Rating
    0
      0  

    Default How to reset paging config

    Found that the paging example (http://sencha.com/examples/#paging) will remember the page I selected last time. Such as when I switch to page 3 and then delete cookie, cache from IE and close the browser. When I open the browser again, the grid still can automatically swtich to page 3 when the example load to the browser.

    How can I reset the page and sorting field config everytime I reload the page?

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    In that example, the relevant code is here:

    Code:
    final Grid<Post> grid = new Grid<Post>(store, cm);  
    grid.setStateId("pagingGridExample");
    grid.setStateful(true);
    Look in your cookies for that domain for a cookie called pagingGridExample - the data is stored in that. Close the page, clear the cookie, and re-open it to reset.

    If you are trying to implement this yourself, start with those setters in the example - if you need to reset it, one option would be to invoke setters on the toolbar, as that is what is used to drive the state that is persisted in cookies.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •