PDA

View Full Version : How to use store.filter to search the entire store



ngugi
11 Nov 2013, 1:44 AM
Hi All,
I have an ext grid that whose record pagesize is 10 and am using (store.filter) to filter values using the pagingtoolbar. Unfortunately its only filtering values using the visible page meaning that if I specify a filter value which is on a different page its returning blank. i.e If am on page one and I specify the filter value which ought to be in page 3. The grid displays nothing. But if I move to page 3 and redo the filter, it correctly filters the record.


My question is, how can I implement the store.filter to scan all the records in the store as opposed to just filtering the current visible page size and I dont want to load all record without the page size.

Thanks

mazhar.shaikh
11 Nov 2013, 4:59 PM
Problem is the store will have only those values that are on the current page. Does your store contain all the records from all pages? (unlikely). Hence you could possibly achieve this using a web service call and querying the database.

lukasz.sudol
12 Nov 2013, 7:11 AM
Hi,

to filter not only local store values you have to change store configuration (remoteFilter : true).

I think this article will help you:
http://devjs.eu/en/autocomplete-combobox-filter-for-ext-js-4-grid-crud-functionality/

thanks.