View Full Version : Filter icon is not removed after clearing filter in GridPanel

Jun 17, 2020, 2:41 PM

we are using a filter in our grid panel, but after clearing the filter, the filter icon is not removed.


This is our clear filter function:

var clearFilter = function()
//var gridFilterHeader = %= GridPanelFilterHeader.ClientID %>;
var store = <%=stoow_CheckPoint_Ablesedaten.ClientID %>;
var gridfilter = <%=GridFilters1.ClientID %>

How can we remove the filter icon when clearing the filter?

Arthur Linhart

Jun 17, 2020, 7:15 PM
Hello Arthur!

You can clear filters straight in the store, as you're doing, but the store can't tell what uses it. In fact, a single store can be shared among different components (https://examples5.ext.net/#/Chart/Combination/Dashboard/), and "copies" of the stores can be created when a same store shares data and not filters/ordering (https://examples5.ext.net/#/Data_Binding/Basic/Chaining_Stores/).

In your case, you just should follow the same path you set the filters to undo them: from the grid. The grid filters plug in exposes some facilities to allow this programmatically and an example doing exactly what you want is this:
- GridPanel > Plugins > GridFilters_Local (https://examples5.ext.net/#/GridPanel/Plugins/GridFilters_Local/)

Hope this helps!