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.
Unfortunately, activation email could not send to your email. Please try again.

Customization of Filtering popup

Thread ID:

Created:

Updated:

Platform:

Replies:

129843 Apr 6,2017 12:42 AM Apr 21,2017 12:24 AM UWP 3
loading
Tags: SfDataGrid
MURALI KRISHNA
Asked On April 6, 2017 12:42 AM

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

Muthukumar Kalyanasundaram [Syncfusion]
Replied On April 10, 2017 11:52 PM

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) 
{ 
    this.dataGrid.ClearFilters(); 
} 



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) 
{ 
    dataGrid.ClearFilters(); 
 
 
 
 
Please let us know if you have any query. 
 
Regards, 
Muthukumar K

MURALI KRISHNA
Replied On April 20, 2017 07:22 AM

Thanks for your answer. It's working nice

Muthukumar Kalyanasundaram [Syncfusion]
Replied On April 21, 2017 12:24 AM

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


CONFIRMATION

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.

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.

;