filterMenuOpen

Fires when the TreeList filter menu is opened. The event handler function context (available through the this keyword) will be set to the widget instance.

Event Data

e.container jQuery

The jQuery object which represents filter menu form element.

e.field String

The field of the column for which the filter menu is opened.

e.sender kendo.ui.TreeList

The widget instance which fired the event.

Example - subscribing to the filterMenuOpen event during initialization

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "id" },
      { field: "name" },
      { field: "age" }
    ],
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22, expanded: true },
      { id: 2, parentId: 1, name: "John Doe", age: 24 },
      { id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
    ],
    filterable: true,
    filterMenuOpen: function(e) {
      e.container.find(".k-textbox:last").focus();
    }
  });
</script>

Example - subscribing to the filterMenuOpen event during initialization and change the default operators

<div id="treelist"></div>
<script>
  function treelist_filterMenuOpen(e) {
    e.container.find(".k-textbox:last").focus();
  }
  $("#treelist").kendoTreeList({
    columns: [
      { field: "id" },
      { field: "name" },
      { field: "age" }
    ],
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22, expanded: true },
      { id: 2, parentId: 1, name: "John Doe", age: 24 },
      { id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
    ],
    filterable: true
  });
  var treelist = $("#treelist").data("kendoTreeList");
  treelist.bind("filterMenuOpen", treelist_filterMenuOpen);
</script>
In this article
Not finding the help you need? Improve this article