Here is how to clear all filtering in datatable.
function fnResetAllFilters() { var oSettings = oTable.fnSettings(); for(iCol = 0; iCol < oSettings.aoPreSearchCols.length; iCol++) { oSettings.aoPreSearchCols[ iCol ].sSearch = ''; } oTable.fnDraw(); }
So to clear just one filter, do:
function reset_filter_with_index(iCol){ var oSettings = oTable.fnSettings(); oSettings.aoPreSearchCols[ iCol ].sSearch = ''; oTable.fnDraw(); }
Yeah it clears the filtering but it doesn’t clear the input filter … plz how can i do it ??
LikeLike
oTable.fnDraw();
LikeLike
use pcsTable.fnFilter(“”); insted of oTable.fnDraw();
LikeLike
Wow ! This is what I had been looking for ! Works great !
LikeLike