Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个有 50 条记录的网格。一旦网格被填充,我希望它在加载到特定表单时过滤记录。例如; 一旦加载,它应该显示所有 10 岁的学生。
这必须编码;我浏览了这个grid-filter-local.js例子,它展示了如何清除过滤器选项,而不是通过代码设置过滤器选项。我怎样才能做到这一点 ?
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 });