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 User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,968
    Vote Rating
    931
      0  

    Default

    There's no built in way, just use:

    Code:
    var data = [];
    store.each(function(rec){
        data.push(....);
    });
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  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,488
    Vote Rating
    147
      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
  •