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

Remove applied filters from PivotGrid

Hi,
I am developing Pivotgrid in Asp.Net MVC from reference demo solution.
I want to create one button, On click of that, I can able to remove all applied filters from PivotGrid using JavaScript.
Does anyone have any workaround on this?


1 Reply

DB Dinesh Babu Yadav Syncfusion Team July 17, 2019 11:32 AM UTC

Hi Heli, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed your query and understand that you should clear the filters on click of button. You can clear the filterSettings on button click by clearing the same. Kindly find the following code snippet. 
 
Code snippet: [JavaScript] 
<script> 
 
    document.getElementById("element").addEventListener('click', function () { 
        var pivotObj = document.getElementById('PivotView').ej2_instances[0]; 
        pivotObj.dataSourceSettings.filterSettings = []; 
         
    }); 
 
</script> 
 
Meanwhile, we have prepared a sample for your reference. Please find the sample link below. 
 
 
Screenshots: 
Initial rendering 
 
 
After the button click: 
 
 
 
Please let us know if you have any concerns. 
 
Regards, 
Dinesh Babu Yadav 
 


Loader.
Live Chat Icon For mobile
Up arrow icon