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_Extjs4_Extjs4.1 - Fatal编程技术网

Extjs 过滤网格中的记录-使用代码

Extjs 过滤网格中的记录-使用代码,extjs,extjs4,extjs4.1,Extjs,Extjs4,Extjs4.1,我有一个有50条记录的表格。一旦网格被填充,我希望它过滤加载到特定表单的记录。例如一旦加载,它应该显示所有10岁的学生 必须对其进行编码;我浏览了grid filter local.js示例,它展示了如何清除过滤器选项,但不按代码设置过滤器选项。我该怎么做?类似的事情 var st = Ext.getStore('MyStore'); st.clearFilter(); st.on('load', function() { st.filter({ filterFn: fun

我有一个有50条记录的表格。一旦网格被填充,我希望它过滤加载到特定表单的记录。例如一旦加载,它应该显示所有10岁的学生

必须对其进行编码;我浏览了
grid filter local.js
示例,它展示了如何清除过滤器选项,但不按代码设置过滤器选项。我该怎么做?

类似的事情

var st = Ext.getStore('MyStore');

st.clearFilter();
st.on('load', function() {
   st.filter({
       filterFn: function(rec) { return rec.get('age') > 10; }
   });
}, this, { single: true });