SMART datagrid v.1 > Classes > RowFilter
Only when it is true, the row filter will be applied.
Defaults to true.
// Get and display only the top 10 rows.
grid.setRowFilter({
callback: function (row) {
return row.index() < 10;
}
});
$('#toggleFilter').click(function () {
grid.setRowFilter({
active: !grid.rowFilter().active()
};
// You can also write as below.
grid.rowFilter().setVisible(!grid.rowFilter().active());
// You can also write as below.
grid.toggle('rowFilter.active');
});