Clearing a Filter

Hi, Could someone point me towards documentation on how to clear any and all filters applied to a datatable, on the click of a button?
Thanks SrvrSide



  • edited March 2015

    You can try the code as follows

    dtable.eachColumn(function(id, col){
         var filter = this.getFilter(id);
         if (filter){
              if (filter.setValue) filter.setValue("")
              else filter.value = "";
  • Thank you very much. Having tried this, it obviously works as intended, but could you suggest how I would have the dataview redraw the columns as they should be presented now the filter is lifted?
    I (incorrectly) assumed dtable.refresh() or dtable.refreshColumns() would do the trick, but it seems not.
    Thank you SrvrSide

  • edited March 2015

    You can use


    To reapply filters

  • Thank you very much.

  • Hi Maksim,

    Is there a way to check custom filters applied to the columns of data table and can be cleared on the button click?

    Kaleem B N

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!