PDA

View Full Version : Set a Filter be Reloading a Store



ballibum
23 Aug 2009, 5:55 AM
Hello Forum,
i am reloading my datastore. now, i want to set a filter to reloadfunction. i have red that i can give the filter to the reloadfunction. has someone an example for me?
my data store looks like:

X: 1,2,3,4,5,6
y: ab, abc, abcd, abcd, abcde, ab

now i want to have only the row with x>2 and y="abcd"

thanks for helping me and sorrie for my questions but i can not read the api documentation

store.reload({filter:{'mm:xx','abc'}});
does not work

httpdotcom
23 Aug 2009, 2:35 PM
There is no "filter" configuration for the store, or the reload method.

You will have to process anything you pass to the store on the backend and implement filtering there.

store.reload( { params: {x: ">2", y: "abcd" } } ) ;
There are two issues with that. Filtering will not persist a store reload, without continuously passing those parameters, and you will have to continuously modify the code as your store/grid grows.

Look at the gridFilter plugin (search the forums).