filter

filters controls by some criteria

void filter(function|object rule,object config);

Parameters

rulefunction|objectthe filtering criteria
configobjectoptional, defines the parameters of filtering

Example

treeGrid.data.filter({
    by: "name",
    match: "Angola"
});

Related samples

Details

Calling the filter() method without parameters reverts the component to the initial state:

tree.data.filter();    // show all

The rule parameter:

  • if set as a function, the filtering will be applied by the rule specified in the function:
tree.data.filter(function (item) {
    return item.value.toLowerCase().indexOf("a") !== -1;
});
  • if set as an object, the parameter has the following attributes:
treeGrid.data.filter({
    by: "name",
    match: "Angola"
});



The config parameter may contain the following properties:

Back to top