Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs 网格过滤器_Extjs_Grid - Fatal编程技术网

Extjs 网格过滤器

Extjs 网格过滤器,extjs,grid,Extjs,Grid,在header(列-‘Author’)中,我想做一个过滤器,所以当用户在过滤器中输入一个单词,然后在表中输出结果(过滤器应该是单词的独立大小写)。这是怎么做的?谢谢 关于此:要在网格面板上使用过滤器,必须执行以下操作: 将“Ext.ux.grid.FiltersFeature”添加到网格的“requires”属性中 将过滤器作为功能添加到网格面板: Ext.define('TPL.view.Book', { extend: 'Ext.grid.Panel', alias: 'widget.bo

在header(列-‘Author’)中,我想做一个过滤器,所以当用户在过滤器中输入一个单词,然后在表中输出结果(过滤器应该是单词的独立大小写)。这是怎么做的?谢谢


关于此:

要在网格面板上使用过滤器,必须执行以下操作:

  • 将“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'
    }
    ...
}