我有一个要求,我需要将已保存的过滤器应用于 ExtJS网格过滤器。一切都很好但是当我在一个列上得到两个过滤器时说' LT '和' gt '对于数字过滤器,我无法过滤数据。
var store=grid.getStore();
store.filter({operator:'lt',value:500,property:'count'},
{operator:'gt',value:100,property:'count'});//applying both less than
and greater than range filters
我在这里发送' lt'和''过滤器。但是只有其中一个被作为请求发送到服务器。因此商店没有得到完全过滤。
答案 0 :(得分:1)
您还错过了将参数作为数组传递。
store.filter([{
id: 'count-lt',
operator: 'lt',
property: 'count',
value: 500
}, {
id: 'count-gt',
operator: 'gt',
property: 'count',
value: 100
}]);