PDA

View Full Version : Query Filtered Data?



ssawchenko
4 Aug 2009, 12:32 PM
Hello hello, once again I have another perhaps noobie question.

I have a groupingStore which is then filtered by using the ext.ux.grid.Search plugin. I was wondering if there is a way to perform a query on the filtered data set? I've tried using the plain query function, but it appears to query the entire original store. This strikes me as odd, since calling store.getCount() appears to return the amount of filtered items.

I know there is a queryby function, but since I am doing my filtering via the Search plugin, I do not have access to using the exact same function to do my query as the filtering is done on.

Has anyone come across this before?
Thanks muchly!

ssawchenko
6 Aug 2009, 1:47 PM
No ideas? :((

Condor
6 Aug 2009, 10:51 PM
queryBy does indeed use the snapshot (if present).

If you want to query the filtered data you could use:

var result = store.data.filterBy(fn, scope);
(store.data is an Ext.util.MixedCollection)

ssawchenko
7 Aug 2009, 8:04 AM
I'll give that a try! Thank you for the reply!