Extjs 网格过滤器
在header(列-‘Author’)中,我想做一个过滤器,所以当用户在过滤器中输入一个单词,然后在表中输出结果(过滤器应该是单词的独立大小写)。这是怎么做的?谢谢Extjs 网格过滤器,extjs,grid,Extjs,Grid,在header(列-‘Author’)中,我想做一个过滤器,所以当用户在过滤器中输入一个单词,然后在表中输出结果(过滤器应该是单词的独立大小写)。这是怎么做的?谢谢 关于此:要在网格面板上使用过滤器,必须执行以下操作: 将“Ext.ux.grid.FiltersFeature”添加到网格的“requires”属性中 将过滤器作为功能添加到网格面板: Ext.define('TPL.view.Book', { extend: 'Ext.grid.Panel', alias: 'widget.bo
关于此:要在网格面板上使用过滤器,必须执行以下操作:
- 将“Ext.ux.grid.FiltersFeature”添加到网格的“requires”属性中
- 将过滤器作为功能添加到网格面板:
Ext.define('TPL.view.Book', { extend: 'Ext.grid.Panel', alias: 'widget.book', title: 'Books', store: 'Book', header: false, stripeRows: true, initComponent: function() { this.columns = [ {header: 'Id', dataIndex: 'id', flex: 1}, {header: 'Author', dataIndex: 'author', width: 50, flex: 0}, {header: 'Price', dataIndex: 'price', width: 50, flex: 0}, ]; this.callParent(arguments); }});
- 最后,使用属性“filter”标记要使用筛选器的列:
features: [ { ftype: 'filters', local: true } ]
{
xtype: 'gridcolumn',
filter: {
type: 'string'
}
...
}