1. #1
    Ext JS Premium Member
    Join Date
    Jul 2011
    Posts
    29
    Vote Rating
    2
    beckdawg is on a distinguished road

      0  

    Default Unanswered: Is it possible to load all data from a store that has pagination?

    Unanswered: Is it possible to load all data from a store that has pagination?


    I currently have a a grid with pagination on it. What I want to do is convert that to a printable html table. Assuming I could grab all of the data from my controller that would be simple enough. What I would like to be able to do is just use store.<some method> and then get back all of the data in an array of some sort then build my html as needed.

    The problem I keep bumping into is the fact that Store works off of cache. I've seen suggestions online that you can use .getRange(). I have tried this by putting it into the store's load call back but it appears to bring back the items that are only in the store's cache. So, it doesn't appear that I can use the store itself.

    What I could do is make a separate ajax call to my controller and get an array that way. However, this seems to be poor implementation because I've already set up the store to do essentially the same thing. Is this my only option here or is there something I'm missing that is easier.

  2. #2
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Vote Rating
    9
    Answers
    15
    stevil will become famous soon enough

      0  

    Default


    When your Store loads, you should have access to the total number of records (via the totalProperty that the Reader picks off). You could try setting the pageSize on the Store to that value, attach a load event to the Store to handle the printing once the data arrives, and then re-issue the load() on the Store...

    hope this helps.
    stevil

Thread Participants: 1