Edit this page

messages Object

The text messages displayed in the filter menu. Use it to customize or localize the filter menu messages.

Example - customize filter menu messages

<div id="filter-menu"></div>
<br /><br />
<div id="grid"></div>
<script>
  var data = [
      { name: "Jane Doe", age: 30 },
      { name: "John Doe", age: 33 }
    ];

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

  $("#filter-menu").kendoFilterMenu({
    dataSource: dataSource,
    field: "age",
    messages: {
        and: "and",
        or: "or",
        filter: "Apply filter",
        clear: "Clear filter"
      }
  });

  $("#grid").kendoGrid({
    columns: [
      { field: "name" },
      { field: "age" }
    ],
    dataSource: dataSource
  });
</script>

messages.and String (default: "And")

The text of the option which represents the "and" logical operation.

messages.clear String (default: "Clear")

The text of the button which clears the filter.

messages.filter String (default: "Filter")

The text of the button which applies the filter.

messages.info String (default: "Show items with value that: ")

The text of the information message on the top of the filter menu.

Example - set the "info" message

<div id="filter-menu"></div>
<br /><br />
<div id="grid"></div>
<script>
  var data = [
      { name: "Jane Doe", age: 30 },
      { name: "John Doe", age: 33 }
    ];

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

  $("#filter-menu").kendoFilterMenu({
    dataSource: dataSource,
    field: "age",
    messages: {
        info: "<h4>Filter by age</h4>"
      }
  });

  $("#grid").kendoGrid({
    columns: [
      { field: "name" },
      { field: "age" }
    ],
    dataSource: dataSource
  });

messages.title String (default: "Show items with value that: ")

The text rendered for the title attribute of the filter menu form.

messages.additionalValue String (default: "Additional value")

The text of the additional filter value editor.

messages.additionalOperator String (default: "Additional operator")

The text of the additional filter operator editor.

messages.logic String (default: "Filters logic")

The text of the filter logic editor.

messages.isFalse String (default: "is false")

The text of the radio button for false values. Displayed when filtering Boolean fields.

messages.isTrue String (default: "is true")

The text of the radio button for true values. Displayed when filtering Boolean fields.

messages.or String (default: "Or")

The text of the option which represents the "or" logical operation.

messages.selectValue String (default: "-Select value-")

The text of the DropDownList displayed in the filter menu for columns whose values option is set.

Example - set the "selectValue" message

<div id="filter-menu"></div>
<br /><br />
<div id="grid"></div>
<script>
  var data = [
    { productName: "Tea", category: 1 },
    { productName: "Ham", category: 2 }
  ];

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

  $("#filter-menu").kendoFilterMenu({
    values: [
        { text: "Beverages", value: 1 },
        { text: "Food", value: 2 },
      ],
    dataSource: dataSource,
    field: "category",
    messages: {
      selectValue: "Select category"
    }
  });

  $("#grid").kendoGrid({
    columns: [
      { field: "productName" },
      { field: "category"}        
    ],
    dataSource: dataSource
  });
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy