Results 1 to 4 of 4

Thread: extracting all data from a datastore

  1. #1
    Ext User
    Join Date
    Jan 2009
    Posts
    16
    Vote Rating
    0
      0  

    Default extracting all data from a datastore

    Hi,
    Is there any way of extracting all of the data from a store in one go.

    I can get one record, or all changes since the last commit. But is there any (other than using a for loop) of extracting the lot.

    Thanks

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,380
    Vote Rating
    858
      0  

    Default

    There's no built in way, just use:

    Code:
    var data = [];
    store.each(function(rec){
        data.push(....);
    });
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Jan 2009
    Posts
    16
    Vote Rating
    0
      0  

    Default

    Ok, thanks

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      0  

    Default

    There is also Store's getRange() which will return you an array of all records that you can loop over yourself.
    Aaron Conran
    @aconran

Posting Permissions

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