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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the FilterToggleButton color while filtering?

Platform: WinRT |
Control: SfDataGrid |
.NET Framework: 4.5

In SfDataGrid, FilterToggleButton is present in the Column Header that is used to open the Filter Pop up window. The appearance of FilterToggleButton is customized by using FilterToggleButton control template that have two visual state: Filtered and UnFiltered respectively. When the Filter is applied then the Filtered visual state is applied to the FilterToggleButton else UnFiltered visual state is applied. The Default style is applied to the FilterToggleButton.

In this section, you can learn how to change the FilterToggleButton color after filtering and create the custom style for FilterToggleButton. PathFillColor is the SolidColorBrush applied to the FilterToggleButton. When the Filter is applied then the PathFillColor is changed to Red else PathFillColor is changed to Gray. Refer the following code example,



C:\Users\labuser\Desktop\note.jpgNote: Refer the following code example for customize the FilterToggleButton Color in WinRT.



Note: The above code snippet is only applicable for WinRT. For other platforms refer respective samples.

Refer the following screenshot for change the FilterToggleButton color after Filtering,

In the above screenshot, Filter is applied to the Name column and the FilterToggleButton color in Name column is changed to Red.

Sample Links:





You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile