admin管理员组

文章数量:1244421

I am a new user of Extjs library, I created a grid successfully and it works just fine, now I want to use Ext.grid.GridFilters to add filtering to my grid, however I don't see this class in the Extjs source code files, where I can get the required files?

I am a new user of Extjs library, I created a grid successfully and it works just fine, now I want to use Ext.grid.GridFilters to add filtering to my grid, however I don't see this class in the Extjs source code files, where I can get the required files?

Share Improve this question asked Nov 12, 2008 at 16:06 AhmadAhmad 2251 gold badge3 silver badges9 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 4

The munity-supported plugin for grid filtering is found in this forum thread.

Filtering is a custom thing you have to implement by yourself. There are a few munity add-ons which make it easy, but start by looking at the actual grid STORE instead of the grid panel. The store contains the data and supports filtering. Once the data is filtered, the store will raise it's data changed event and as long as the grid is wired accordingly you will see the filtered recordset in the grid. For more info I'd check out their example pages and read the source there.

As mentioned above: use the filter method in the store.

There is a tutorial covering the subject at http://aboutfrontend./2011/01/extjs-grid-filter/

There is proper filter option is provided by ExtJs:

store.filterBy(function(rec, id)) { return (rec.get("RecName") =="FilterRecord");}

After filtering data, filter will always present in stores Filters config. So if we want to remove filters and show all records then just clear applied filters like this:

store.clearFilter();

本文标签: javascriptEXtjs Grid FiltersStack Overflow