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

clearFiltering throws Error

Thread ID:





132680 Sep 15,2017 06:20 AM UTC Sep 18,2017 10:59 AM UTC Angular 1
Tags: ejGrid
Bernd Schuhmacher
Asked On September 15, 2017 06:20 AM UTC


When tinkering with some filtering on a grid I observed the following.

If I use the clearFiltering Method on a column that was not filtered before it throws an error when the filterType is set to 'excel'. It works if the filterType is set to 'filter bar'. Is this a bug with the 'excel' grid?

If this is a wanted feature is there a straightforward way to find out if a filter is set for a given column? I don’t think it is straightforward to get all filters from *.widget.model.filterSettings.filteredColumns and run through all entries looking for the value of ‘field’.




Mani Sankar Durai [Syncfusion]
Replied On September 18, 2017 10:59 AM UTC

Hi Bernd, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we are able to reproduce the reported issue. We have confirmed that the issue “Script error throws when clearFiltering without filtering the columns” is a defect, and we have logged a defect report. The fix for this issue will be included in our Volume 3 SP2, 2017 release expected to be out by the month of September, 2017. 
Until then we suggest you to use the below workaround solution which helps to solve this issue.  
Refer the code example 
                <button id="btn" onclick="myFunc()">Clear filter</button> 
                <div id="Grid"></div> 
<script type="text/javascript"> 
    $(function () { 
            dataSource: window.gridData, 
            allowFiltering: true, 
            columns: [ 
        function myFunc(){ 
            var grid = $('#Grid').ejGrid("instance"); 
            if (grid.filterColumnCollection.length) {  //check the condition if the column is filtered before calling clearFiltering method 

We have prepared a simple sample link in JSPlayground that can be available under the below link. 

Manisankar Durai. 


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