I have multiple filters that I am going to apply on the kendo grid datasource.
If I have a filter like below, everything is okay where gridConfig is the configuration of my kendo grid:
var mainFilters = [];
mainFilters.push({
field: "x",
operator: "eq",
value: 1
});
mainFilters.push({
field: "y",
operator: "eq",
value: 2
});
gridConfig.instance.dataSource.filter({
logic: "and",
filters: mainFilters
});
My problem is in here. I have another property lets say z that is an array of values. I want to filter the kendo grid datasource on z propery values with OR logic. For example, here is my z propery filter:
zFilters.push(
{ field: "z", operator: "eq", value: 3},
{ field: "z", operator: "eq", value: 4});
gridConfig.instance.dataSource.filter({
logic: "or",
filters: zFilters
});
Now, I want to combine these two filters and apply them simultaneously on my kendo grid datasource. It means that my final result is based on this logic:
(x = 1) AND (y = 2) AND (z = 3 OR z = 4)
How can I do this with kendo filters?