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.

ej Grid Clear Search

Thread ID:

Created:

Updated:

Platform:

Replies:

126056 Sep 20,2016 08:01 PM Sep 21,2016 06:06 AM ASP.NET MVC 1
loading
Tags: Grid
Arun Gandhi
Asked On September 20, 2016 08:01 PM

Hello

How can I clear Grid tool bar search box on click of a button?

Please let me know.

Thanks


Jayaprakash Kamaraj [Syncfusion]
Replied On September 21, 2016 06:06 AM

Hi Arun,   
  
Thank you for contacting Syncfusion support.   
  
In Grid, we have clearSearching method to clear searching from the grid. Please refer to the below help document, code example and sample.   


<button id="search">Clear Search</button> 
.. 
 
<script type="text/javascript"> 
    $("#search").click(function () { 
        var gridobj = $("#FlatGrid").ejGrid("instance"); 
        gridobj.clearSearching(); 
 
    }); 
 
</script> 


Else, if you want to clear search text in search, use the below code example,   

<script type="text/javascript"> 
    $("#search").click(function () { 
        $("#FlatGrid_searchbar").val("") // here we can clear search text  
        // FlatGrid is GridID 
    }); 
 
</script> 

Regards, 

Jayaprakash 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.

;