When filtering a grid, the filter icon actually changes color, but do you want the whole title to change?
I donβt see any configuration in the grid that would allow you to indicate this or any filter event that you could get into, but this does not make it impossible.
Looking at what happens in the Grid, when filtering a column, an additional .k-state-active class is added to the column header. We can apply CSS that can easily change the background color for this class, but it does not apply to the entire title (the parent TH element), and there is no parent selector in CSS.
I think for this you may have to redefine the update function of the Kendo FilterMenu widget, replacing it with its own function, which then calls the original function. Once you do this, you can extend FilterMenu to add an extra class to the entire header.
// Grab old refresh function var filterMenu = kendo.ui.FilterMenu.fn; filterMenu.oldRefresh = filterMenu.refresh; // Replace it with our own filterMenu.refresh = function () { filterMenu.oldRefresh.apply(this, arguments); // Add an additional class to the column header if (this.link.hasClass('k-state-active')) { this.link.parent().addClass('k-state-active'); } else { this.link.parent().removeClass('k-state-active'); } };
You can then use CSS to adjust the background color for the .k-state-active in the grid header.
#grid thead .k-state-active { background-color: crimson; }
You can see it in action here.
source share