fields.type String

Defines the value type of the field.

Note: By default if a value is not provided the type will be string.

The available dataType options are:

  • "string"
  • "number"
  • "boolean"
  • "date"

Example - set the editorTemplate

<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,
    expression: {
        logic: "or",
        filters: [
            { field: "name", value: "Jane Doe", operator: "eq" },
            { field: "name", value: "John Doe", operator: "eq" },
            { field: "age", value: 33, operator: "eq" },
            { field: "age", value: 30, operator: "eq" }
        ]
    },
    fields: [
      { name: "age", type:"number", label: "Age" },
      { name: "name", type:"string", label: "Name" }
    ]
  });
</script>
In this article