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
close icon

Customization of Filtering popup

I am using filter for all columns in a grid by using "AllowFiltering=true" , when I filter a column I get the resulting row in grid, but to clear the filter again I have to go for filter popup and choose "Clear filters" option from the popup, what my requirement is if I clicked on filter icon(when the filter is on), the filtering is clear. How can I achieve this??
Thanks in advance

3 Replies

MK Muthukumar Kalyanasundaram Syncfusion Team April 11, 2017 03:52 AM UTC

Hi Murali, 

Thank you for contacting Syncfusion support. 

If you want to clear the filtered record in SfDataGrid, you can use ClearFilters method. Please refer the below code snippet and documentation link, 

Code Snippet: 

private void Button_Click(object sender, RoutedEventArgs e) 

You can clear the filtered record while selecting the filter icon by handling PopupOpened event in filtercontrol property. 
dataGrid.FilterItemsPopulating += DataGrid_FilterItemsPopulating; 
private void DataGrid_FilterItemsPopulating(object sender, GridFilterItemsPopulatingEventArgs e) 
    e.FilterControl.PopupOpened += FilterControl_PopupOpened1; 
private void FilterControl_PopupOpened1(object sender, PopupOpenedEventArgs e) 
Please let us know if you have any query. 
Muthukumar K

MK MURALI KRISHNA April 20, 2017 11:22 AM UTC

Thanks for your answer. It's working nice

MK Muthukumar Kalyanasundaram Syncfusion Team April 21, 2017 04:24 AM UTC

Hi Murali, 
Thanks for the update. Please let us know if you need any other assistance. 
Muthukumar K 

Live Chat Icon For mobile
Up arrow icon