I have a Kendo UI grid that is rendered with javaScript. I want the string columns to have a single option (\"Contains\") and without the second filter. So far so good, I wr
The best way to change the default operator for all of the instances:
kendo.ui.FilterMenu.prototype.options.operators =
$.extend(kendo.ui.FilterMenu.prototype.options.operators, {
string: {
contains: "Contains",
startswith: "Starts with",
eq: "Is equal to",
neq: "Is not equal to",
doesnotcontain: "Does not contain",
endswith: "Ends with"
}
});
and the complete script:
kendo.ui.FilterMenu.prototype.options.operators =
$.extend(kendo.ui.FilterMenu.prototype.options.operators, {
/* FILTER MENU OPERATORS (for each supported data type)
****************************************************************************/
string: {
contains: "Contains",
startswith: "Starts with",
eq: "Is equal to",
neq: "Is not equal to",
doesnotcontain: "Does not contain",
endswith: "Ends with"
},
number: {
eq: "Is equal to",
neq: "Is not equal to",
gte: "Is greater than or equal to",
gt: "Is greater than",
lte: "Is less than or equal to",
lt: "Is less than"
},
date: {
eq: "Is equal to",
neq: "Is not equal to",
gte: "Is after or equal to",
gt: "Is after",
lte: "Is before or equal to",
lt: "Is before"
},
enums: {
eq: "Is equal to",
neq: "Is not equal to"
}
/***************************************************************************/
});