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

Search

configuration

Configures the Kendo UI Grid search bar settings.

Object
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "productName" },
    { field: "category" }
  ],
  dataSource: [
    { productName: "Tea", category: "Beverages" },
    { productName: "Coffee", category: "Beverages" },
    { productName: "Ham", category: "Food" },
    { productName: "Bread", category: "Food" }
  ],
  toolbar: ["search"],
  search: {
    fields: [
      { name: "productName", operator: "contains" },
      { name: "category", operator: "eq" }
    ]
  }
});
</script>

Defines a list of fields which will be included in the search. If values for the property are not defined the grid will search in all column fields.

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" }
  ],
  dataSource: [ { name: "Jane", age: 30 }, { name: "John", age: 33 }],
  toolbar:["search"],
  search: {
    fields: ["name"] // Or, specify multiple fields by adding them to the array, e.g ["name", "age"]
  }
});
</script>
In this article
searchsearch.fields
Not finding the help you need?
Contact Support