Results 1 to 2 of 2

Thread: Using query/queryBy on filtered stores

  1. #1
    Sencha Premium Member
    Join Date
    Dec 2010
    Posts
    27

    Default Using query/queryBy on filtered stores

    I have an Ext.data.Store that may or may not have filters applied on it. I want to retrieve a MixedCollection of records using the Ext.data.Store.query or queryBy methods, but these methods ignore any filters that are applied to the Store, so I'm getting back more records than I want. Ext.data.Store.find respects the filters, but I can't use that because it only returns the first match, and I want all matches. Is there a method that works like query but respects the filters?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    You could use on of the following to search through the store ... and build your own map.

    Code:
    store.findBy(function(){ .. })
    store.each(function(){ .. });
    This is basically what query does, but uses entire store.

    Scott.

Posting Permissions

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