EXTjs gridfilter:如何清除过滤器而不需要重新加载存储? [英] EXTjs gridfilter: How to clearfilter without reloading store?

查看:189
本文介绍了EXTjs gridfilter:如何清除过滤器而不需要重新加载存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在extjs GridFilter中,是否有一种方法来清除过滤器而不重新加载存储?

这是查询:

有一个网格(#1)和另一个网格(#2)在网格下面。网格(#1)具有ids列表,当特定的id被点击时,网格(#2)中会显示属于该ID的记录列表。

例子可能是:grid#1:所有maangers的列表

grid#2:特定maanger的所有员工列表。

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有一个过滤器:在员工姓名上。

Grid #2 has a filter: on employee name.

rqmt是:当网格#1中的选择更改时,清除所有旧的过滤器,但不要重新安排网格#2的存储作为网格#2的商店将通过另一个功能加载。

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

推荐答案

在一些Firebug步进之后,我发现这个功能很好。

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 似乎没有记录属性,但是当它设置为 false 时,它将暂停xhr调用。

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

设置 remoteFilter 为false,当 clearFilter()被调用时, load()函数被踩踏了。

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

这篇关于EXTjs gridfilter:如何清除过滤器而不需要重新加载存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆