ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: angelahlp on March 03, 2014, 02:01:52 am
-
Is there an easy way to clear all filters?
-
Easy way to turn off all filters is by setting on:false in the filterModel.
http://paramquery.com/pro/api#option-filterModel
-
I've added this button to my grid toolbar but when clicked it does nothing?
{ type: 'button', label: 'Clear Filters', listeners: [
{ "click": function (evt, ui) {
$grid.pqGrid( "option", "filterModel", { on: false } );
}
}
]
},
-
Method 1:
Call refreshDataAndView after setting on : false
$grid.pqGrid( "option", "filterModel", { on: false } );
$grid.pqGrid( "refreshDataAndView" );
Method 2:
$grid.pqGrid( "filter", { oper:'replace', data: [] } );
-
Thanks! That last line did the trick! :)