I want to apply filtering locally on the jQuery grid, but I don't want the Filter UI to be enabled (I am applying filters manually). What is the easiest way to hide the Filter UI?
Thanks,
-Dave
hey,
in fact if you want to filter the grid through the API, you don't even have to include filtering feature, because filtering is directly implemented in the data source of the grid. So you can filter in the following way:
1) One way to do it - locally:
$("#grid1").data('igGrid').dataSource.filter(expressions);
where expressions is , for example:
var expressions = [
{fieldName: "something", cond: "startsWith", expr: "a" },
// another expression... etc...
];
2) Another way, set the expressions to datasource's filtering expressions, then call dataBind on it:
$("#grid1").data('igGrid').dataSource.settings.filtering.expressions = <expressions>;
$("#grid1").data('igGrid').dataSource.dataBind();
or just:
$("#grid1").igGrid('dataBind');
But your approach is correct and will do.
Angel
I would go for the following CSS
table#yourGridId_headers tr.ui-iggrid-filterrow {
display:none;
}