开发者

extjs filter editor

does extJS have any kin开发者_开发技巧d of visual filtering tool for its grids.

there are three sample criterias in the next line which are added by the user, and an x button to remove the criteria.

Sample Filter:

[Business Unit=Accounting-x] [Name like 'Jo*'-x] [Age between 25-33-x]

Personnel Grid (displaying the filtered data)

1 33 Josh Accounting

2 35 John Accounting alt text http://img189.imageshack.us/img189/9879/searchresultsn.jpg


It's been a while since I used Ext, but if I remember correctly, you can access the store property of the grid control. This gives you an Ext.data.Store which has a filter method that can take either a String or a RegEx. You can then update the grid control (I don't remember if this is required or not, but I seem to remember it being required in Ext 2.1).

Look at the API documentation for Ext.data.store.


http://www.extjs.com/deploy/dev/examples/grid-filtering/grid-filter-local.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜