ColumnfilterWidgets Reset Filters

ColumnfilterWidgets Reset Filters

hhhjjjkkklllhhhjjjkkklll Posts: 7Questions: 4Answers: 0

Hi, I am using Columngilterwidgets.
I am using reset filters button for it which will reset all the set filtered terms on click

$.fn.dataTableExt.oApi.fnResetAllFilters = function (oSettings, bDraw) {
for(iCol = 0; iCol < oSettings.aoPreSearchCols.length; iCol++) {
oSettings.aoPreSearchCols[ iCol ].sSearch = '';
oSettings.oPreviousSearch.sSearch = '';
if(typeof bDraw === 'undefined') bDraw = true;
if(bDraw) this.fnDraw();

// button click event
// 'myDataTable' is the name you gave the datatable at initialisation - oTable or similar

But issue i am facing is this code is just resets the table and removes the filter term but , the filter term is still in the asFilters. how can i reset the asFilters?

This discussion has been closed.