EXTjs gridfilter: How to clearfilter without reloading store?

后端 未结 4 1830
孤街浪徒
孤街浪徒 2021-01-16 02:03

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 gri

4条回答
  •  逝去的感伤
    2021-01-16 02:07

    I've experienced the same issue but not with a Grid but with a DataView, however, this might apply equally to your case. I initially tried:

    var store = this.getStore();
    store.suspendEvents();
    store.clearFilter();
    store.resumeEvents();
    store.filter(...);
    

    this didn't work—still 2 HTTP requests were made, once for clearFilter(), once for filter(...).

    However, the following works:

    var store = this.getStore();
    store.getProxy().extraParams['q'] = keywords;
    store.load();
    

提交回复
热议问题