Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.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
Search 过滤网格-ExtJS_Search_Extjs_Filter_Grid - Fatal编程技术网

Search 过滤网格-ExtJS

Search 过滤网格-ExtJS,search,extjs,filter,grid,Search,Extjs,Filter,Grid,我试图根据用户在文本字段中搜索的内容搜索特定字段。例如: items: [ { xtype: 'panel', padding: 5, height: 500, width: '35%', items: [ { xtype: 'textfield', padding: 5, region: 'west', fieldLabel: 'Criteria 1', itemId: 'crit

我试图根据用户在文本字段中搜索的内容搜索特定字段。例如:

items: [ 
            { xtype: 'panel', padding: 5, height: 500, width: '35%',
                    items: [
                        { xtype: 'textfield', padding: 5, region: 'west', fieldLabel: 'Criteria 1', itemId: 'criteria_1'  }, ...
下面是我的视图类中的代码:

store.filter('KBE_ID', '#criteria_1');

我想返回使用my textfield值的筛选搜索。这可以通过给它一个itemId来完成吗?

使用
itemId
获取对字段的引用,然后使用
getValue()
进行筛选:


有道理,我只是对myPanel的引用感到困惑。
myPanel
是对搜索字段的任何父面板的引用。在没有看到代码的完整上下文的情况下,我无法确切地告诉您如何操作,但是
x.down(“#criteria_1”)
将适用于组件层次结构中作为
criteria_1
父级的任何
x
var searchField = myPanel.down('#criteria_1');
store.filter('KBE_ID', searchField.getValue());