Results 1 to 3 of 3

Thread: Get all reords from a filtered grid with pagination

  1. #1

    Default Get all reords from a filtered grid with pagination

    Hi ,

    I am facing issue in getting all the records from a filtered grid with pagination. I am getting only the first page record. I have applied external filters in the grid . After applying filter the record reduced from 500 to 200 . Because of pagination i am able to iterate through first 20 records. I need to iterate through the 200 records .

    Could some one please help me to find a solution to iterate through the filtered records .

    Thanks,
    Vishnu Priya

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Hi--

    The store only knows about the records which have been returned from the server in response to the request for the particular "page" of data. Therefore, in order to iterate over all the records that are available, you'll need to make them available to the store or by some other mechanism (e.g., another AJAX request that returns *all* the data).

    Thanks!
    Joel

  3. #3
    Sencha User
    Join Date
    Sep 2017
    Posts
    19

    Default

    Use the below code if you are using a memory proxy

    Code:
     var recordsFromtheStore = store.proxy.reader.read(store.proxy.getData()).records;
     var filteredRecords = Ext.Array.filter(recordsFromtheStore, Ext.util.Filter.createFilterFn(store.filters));
    var sortedRecords  = filteredRecords ;
     if (store.sorters && store.sorters.length) {
           sortedRecords = Ext.Array.sort(filteredRecords, Ext.util.Sortable.createComparator(store.sorters.items));
      }

Similar Threads

  1. Replies: 2
    Last Post: 18 Feb 2015, 11:18 AM
  2. Filtered ListStore fires filtered AddEvents
    By acerberus in forum Sencha GXT Discussion
    Replies: 0
    Last Post: 24 Jan 2013, 11:46 PM
  3. Pagination in Grid -- Buffered pagination or Override Paging Toolbar
    By jAson bOurnE in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 18 Oct 2010, 1:51 AM
  4. Filtered Tree - Where are filtered items held?
    By bboyle18 in forum Ext GWT: Discussion
    Replies: 3
    Last Post: 26 Aug 2009, 6:31 AM

Posting Permissions

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