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 customize the Filtering and Sorting icons in the SfDataGrid ?

Platform: UWP |
Control: SfDataGrid |
Published Date: December 6, 2017 |
Last Revised Date: December 6, 2017

You can customize the appearance of Filter and Sort icon of SfDataGrid by override the styles of FilterToggleButton and GridHeaderCellControl. And change the appearance of filter popup by override the style of GridFilterControl.

Customize the appearance of Sort icon

The appearance of sort indicator can be customized by override the style of GridHeaderCellControl. Under the PART_SortButtonPresenter, you can change its path value to specify expected customized appearance for both Ascending and Descending sort icons. Refer the below code, here the sort icon default color is changed from Gray to Red.

 

Customize the appearance of Filter icon

The appearance of filter icon can be customized by override the FilterToggleButton style. Refer the below code, here the filter icon default color is changed from Gray to Red and the height of filter icon is changed the default value to 18.

 

The following screenshot displays the customized Filter and Sort icon of GridHeaderCellControl in SfDataGrid.

 

 

Customize the appearance of Filter-Popup

You can customize the appearance of filter popup by overriding the style of GridFilterControl. Under the PART_OkButton and PART_CancelButton, you can change the appearance for both buttons. Refer the below code, here the filter popup button default background color is changed from Transparent to LightBlue and Foreground color is changed from Gray to Red.

 

Sample: CustomizeFilterandSortIcon

ADD COMMENT
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.

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