View Full Version : search in store

6 May 2010, 11:36 AM
I have grid with paging.
I have set up a search popup where in I can search a record in the store using store.filter().
The problem is that filter() will search only the subset of the data currently in the store.
To search the entire dataset, if I do a store.load() and get all then the paging will go awry.
Please suggest a solution

7 May 2010, 12:41 PM
The concept of paging is that the store will only get a certain number of results per request. You will either need to store the entire dataset in a separate store, then run the filter on that store, then return those results to the paging store...which is complicated...or, and this is what I'd recommend, perform the filter server-side, and pass the search text as a parameter. Yes, this means another http request, but you don't have to hassle with two separate stores and try to set filters between them.