How do I reset my ExtJS filters in my grids. More specifically, how do I get a headline to honor changes in filtering.
T. This works great:
grid.store.clearFilter();
But the rendering of the headers is incorrect. I need to go into all the menu objects and uncheck the boxes.
I'm lost. I am sure this gives me filterItems:
var filterItems = grid.filters.filters.items;
And from each of these filtering elements I can go to the following menu items:
var menuItems = filter.menu.items;
But what can I get. I am expecting some kind of checkbox object inside the menu items, and then I can uncheck this checkbox and hopefully the rendering of the title changes.
UPDATE:
I now have this code. The grid screen is cleaned. Then I get filterItems from grid.filters.filters.items and iterate over them. Then I call a function for each of the menu items.
grid.store.clearFilter(); var filterItems = grid.filters.filters.items; for (var i = 0; i<filterItems.length; i++){ var filter = filterItems[i]; filter.menu.items.each(function(checkbox) { if (checkbox.setChecked) checkbox.setChecked(false, true); }); }
These flags are called, but nothing happens :(
source share