extjs重新激活grid,EXTjs gridfilter:如何清除过滤器而不需要重新加载存储?

In extjs GridFilters, is there a way to clear the filters without reloading the store?

This is the rquirement:

There is a grid(#1) and another grid(#2) below the grid. The grid(#1) has a list of ids, and when a particular id is clicked, the grid(#2) is popualted with a list of records that belong to that id.

And example might be:grid#1: list of all maangers

grid#2: list of all employees for a particular maanger.

Grid #2 has a filter: on employee name.

The rqmt is: When a selection is changed in grid#1, clear all the old filters, but do not relaod the store for grid #2 as grid#2 store will be loaded through another function.

Please let me know how I can help by providing more info

解决方案

After some Firebug stepping, I found this works quite well.

var store = this.getStore();

store.remoteFilter = false;

store.clearFilter();

store.remoteFilter = true;

store.filter(...);

remoteFilter does not seem to be a documented property, but it will suspend xhr calls while it's set to false.

When you set remoteFilter to false, when clearFilter() is called, the load() function is stepped over.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值