We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to better show filtered columns to the user ?

Thread ID:





123455 Mar 18,2016 02:19 PM UTC Mar 21,2016 12:00 PM UTC WPF 1
Tags: SfDataGrid
Asked On March 18, 2016 02:19 PM UTC


Is it possible in SfDataGrid to dinamically change the header background color of a column as soon as this column becomes filtered so that it is more evident to the user ?


Attachment: syncfusion_(2)_ccf25a23.zip

Jayapradha S [Syncfusion]
Replied On March 21, 2016 12:00 PM UTC

Hi Silvio,

Thank you for contacting Syncfusion Support.

We have analyzed your requirement. You can change the column header background when applying filter to that column by using SfDataGrid.FilterChanged event as shown below,

Code Example:
this.datagrid.FilterChanged += datagrid_FilterChanged;  

void datagrid_FilterChanged(object sender, GridFilterEventArgs e)


            if (e.FilterPredicates != null && e.FilterPredicates.Count > 0)

                e.Column.HeaderStyle = App.Current.FindResource("headerStyle") as Style;


                e.Column.HeaderStyle = new Style();        

<Style x:Key="headerStyle" TargetType="Syncfusion:GridHeaderCellControl">

            <Setter Property="Background" Value="Green" />


We have prepared a sample for your requirement and please find the sample from the following location,
Sample Link: http://www.syncfusion.com/downloads/support/forum/123455/ze/Filter_Changed_123455-674810504  



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon