applyFilter
Applies the generated filter to the dataSource.
Example - apply filter
<div id="filter"></div>
<br /><br />
<div id="grid"></div>
<script>
var data = [
{ name: "Jane Doe", age: 30 },
{ name: "John Doe", age: 33 }
];
var dataSource = new kendo.data.DataSource({
data: data,
schema: {
model: {
fields: {
name: { type: "string" },
age: { type: "number" }
}
}
}
});
$("#filter").kendoFilter({
dataSource: dataSource,
expression: {
logic: "and",
filters: [
{ field: "name", value: "Jane Doe", operator: "eq" }
]
}
});
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ field: "age" }
],
dataSource: dataSource
});
$("#filter").data("kendoFilter").applyFilter();
</script>