I am facing a challenge with writing a custom filter function for a kendo grid that has multiple columns such as name, age, and city. Specifically, I need the name column to have a multiselect filter with "or" logic while the rest of the grid follows an "and" logic.
In my search for a solution, I came across a helpful post by Telerik which suggests removing the data-bind attribute using:
element.removeAttr("data-bind");
Although this method works well, it fails to clear all tags from the multiselect field when in filterMode: "row". This led me to start working on a custom filter function. Here is a snippet of my progress so far:
filterable: {
multi: true,
cell: {
template: function getteamplate(args) {
args.element.kendoMultiSelect({
// implementation logic
});
//args.element.removeAttr("data-bind");
},
showOperators: false
}
}
However, I have encountered a couple of challenges:
- My custom filter function is not executing as expected, and I do not see any output in the console.
Referring to this forum post, the code for the operator function seems straightforward:
operator: function(item, value){ //implement your logic }
Despite the simplicity of the code, I am unsure about the parameters 'item' and 'value' and their origin.