Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When you filter the Grid the filter icon actually changes color but you'd like the entire header to change?</p> <p>I can't see any configuration on the grid that would allow you to specify this or any filter event that you could hook into, however that doesn't make it impossible. </p> <p>Looking at what happens in the Grid, when you filter a column an additional class of <code>.k-state-active</code> is added to the filter icon in the column header. We can apply some CSS that would change the background color for that class quite easily, however it doesn't apply to the whole header (the parent TH element) and there's no parent selector in CSS. </p> <p>I think in order to do this you might have to override the refresh function of the Kendo FilterMenu widget, by replacing it with your own function that then calls the original function. Once you've done this you can extend the FilterMenu to add an additional class to the entire header.</p> <pre><code>// 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'); } }; </code></pre> <p>You can then use CSS to adjust the background color for <code>.k-state-active</code> within the grid header.</p> <pre><code>#grid thead .k-state-active { background-color: crimson; } </code></pre> <p>You can see it in action <a href="http://jsbin.com/elavoq/1" rel="noreferrer">here</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload