In extjs GridFilters, is there a way to clear the filters without reloading the store?
This is the rquirement:
There is a grid(#1) and another grid(#2) below the grid. The grid(#1) has a list of ids, and when a particular id is clicked, the grid(#2) is popualted with a list of records that belong to that id.
And example might be:grid#1: list of all maangers
grid#2: list of all employees for a particular maanger.
Grid #2 has a filter: on employee name.
The rqmt is: When a selection is changed in grid#1, clear all the old filters, but do not relaod the store for grid #2 as grid#2 store will be loaded through another function.
Please let me know how I can help by providing more info
解决方案
After some Firebug stepping, I found this works quite well.
var store = this.getStore();
store.remoteFilter = false;
store.clearFilter();
store.remoteFilter = true;
store.filter(...);
remoteFilter does not seem to be a documented property, but it will suspend xhr calls while it's set to false.
When you set remoteFilter to false, when clearFilter() is called, the load() function is stepped over.