New to Kendo UI for jQuery? Start a free 30-day trial

Operators

configuration

The text of the filter operators displayed in the filter.

If operators are defined manually, then the default messages will be overridden too. If you would like to control the operators and still use the default messages,

then you will need to retrieve them from the Filter prototype - kendo.ui.Filter.fn.options.operators.{type}, where type can be "string", "date", "number" and "enums".

operators

Object
<div id="filter"></div>
<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,
    operators: {
        string: {
            eq: "Is equal to",
            neq: "Is not equal to",
            contains: "Contains"
        },
        number: {
            eq: "Is equal to",
            neq: "Is not equal to",
            gt: "Is greater than"
        }
    },
    fields: [
      { name: "age", type: "number", label: "Age" },
      { name: "name", type: "string", label: "Name" }
    ]
  });
</script>

The texts of the filter operators displayed for boolean fields

Omitting an operator will exclude it from the DropDownList with the available operators.

<div id="filter"></div>
<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,
    operators: {
        boolean: {
            eq: "Is equal to",
            neq: "Is not equal to"
        }
    },
    fields: [
      { name: "isManager", type: "boolean", label: "Is Manager" }
    ]
  });
</script>

The texts of the filter operators displayed for date fields.

Omitting an operator will exclude it from the DropDownList with the available operators.

<div id="filter"></div>
<script>
  var data = [
      { name: "Jane Doe", birthDate: new Date(1990, 0, 15) },
      { name: "John Doe", birthDate: new Date(1985, 5, 20) }
    ];

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

  $("#filter").kendoFilter({
    dataSource: dataSource,
    operators: {
        date: {
            eq: "Is equal to",
            neq: "Is not equal to",
            gte: "Is after or equal to",
            lte: "Is before or equal to"
        }
    },
    fields: [
      { name: "birthDate", type: "date", label: "Birth Date" }
    ]
  });
</script>

The texts of the filter operators displayed for number fields.

Omitting an operator will exclude it from the DropDownList with the available operators.

<div id="filter"></div>
<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,
    operators: {
        number: {
            eq: "Equals",
            neq: "Not equal",
            gte: "Greater than or equal",
            lte: "Less than or equal"
        }
    },
    fields: [
      { name: "age", type: "number", label: "Age" }
    ]
  });
</script>

The texts of the filter operators displayed for string fields.

Omitting an operator will exclude it from the DropDownList with the available operators.

<div id="filter"></div>
<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,
    operators: {
        string: {
            eq: "Equals",
            neq: "Not equal",
            contains: "Contains text",
            startswith: "Starts with"
        }
    },
    fields: [
      { name: "name", type: "string", label: "Name" }
    ]
  });
</script>