operators.number.custom.text String
The text displated in the operators drop down.
Example - set the operator
<div id="filter"></div>
<br /><br />
<script>
var data = [
{ name: "Jane Doe", age: 30 },
{ name: "John Doe", age: 33 }
];
var dataSource = new kendo.data.DataSource({
data: data
});
$("#filter").kendoFilter({
dataSource: dataSource,
expressionPreview: true,
fields: [
{ name: "age", type:"number", label: "Age", operators: {
number:{
customOperator:{
text: 'Custom operator',
handler: customOperatorHandler
}
}
} },
{ name: "name", type:"string", label: "Name" }
]
});
function customOperatorHandler(itemValue, filterValue){
return itemValue > filterValue / 2;
}
</script>