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

Custom Excel Style Grid Toolbar Item to Clear All Filters

Thread ID:





128935 Feb 16,2017 05:20 PM UTC Feb 22,2017 05:10 AM UTC ASP.NET Web Forms 3
Tags: Grid
Levi Leonards
Asked On February 16, 2017 05:20 PM UTC

I have an Excel Style Grid where every column can be filtered.
How can I create a Custom Toolbar Item to clear all of the filters on the grid and load the default data set?

Pavithra Subramaniyam [Syncfusion]
Replied On February 17, 2017 06:32 AM UTC

Hi Levi, 

We have analyzed your query and we have achieved your requirement by using CustomToolbarItem  property of ToolbarSettings and we  can clear the filtering using clearFiltering method of ejGrid control. Actions for this customized toolbar is defined in ToolbarClick event. Please refer the following code snippet, online document link and sample link . 
<ej:Grid ID="OrdersGrid" runat="server" AllowFiltering="True" AllowPaging="True" > 
<FilterSettings FilterType="Excel" />  
       <ClientSideEvents ToolbarClick="onToolBarClick" /> 
       <EditSettings AllowAdding="True" AllowDeleting="True" AllowEditing="True"></EditSettings> 
       <ToolbarSettings ShowToolbar="True"> 
                        <ej:CustomToolbarItem Text="clearFilter" /> 
                  . . . 
    . . . 
<script type="text/javascript"> 
            function onToolBarClick(sender) { 
                if (sender.itemName == "clearFilter") 
                                            2. https://help.syncfusion.com/api/js/ejgrid#methods:clearfiltering 
Pavithra S. 

Levi Leonards
Replied On February 21, 2017 09:23 PM UTC

Perfect example, thanks!

Pavithra Subramaniyam [Syncfusion]
Replied On February 22, 2017 05:10 AM UTC

Hi Levi, 
Thanks for your update.           
We are happy that the provided information helped you. 
Pavithra S. 


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