operators.boolean.custom.handler Function

The handler of the operator.

Example - set the operator

<div id="filter"></div>
<br /><br />
<script>
  var data = [
      { name: "Jane Doe", isManager: true },
      { name: "John Doe", isManager: false }
    ];

  var dataSource = new kendo.data.DataSource({
    data: data
  });

  $("#filter").kendoFilter({
    dataSource: dataSource,
    expressionPreview: true,
    fields: [
      { name: "isManager", type:"boolean", label: "Is manager", operators: {
          boolean:{
            customOperator:{
              text: 'Custom operator',
              handler: customOperatorHandler
            }
          }
        } },
      { name: "name", type:"string", label: "Name" }
    ]
  });

  function customOperatorHandler(itemValue, filterValue){
    return itemValue == filterValue;
  }
</script>
In this article