A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/data_collection/api/datacollection_filter_method/ below:

Website Navigation


JavaScript DataCollection - filter Method

filter()

filters data items in a component

filter(rule?: function | object, config?: object): string;

Parameters: Returns:

Example

// filtering data by a function
grid.data.filter(function (item) {
return item.a > 0 && item.b !== "Apple";
});

// or
grid.data.filter(function (item) {
return item.a > 0 && item.b !== "Apple";
}, {
add: true,
});

// filtering data by the column
grid.data.filter({
by: "a",
match: "Orange",
compare: function (value, match, item) {
if (item.a !== "Some") {
return val === "New";
}
return false;
}
}, {
add: true,
});

Related sample: Data. Filter


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4