columnMenuOpen

Fires when the column 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 column menu form element.

e.field String

The field of the column for which the column menu is initialized.

e.sender kendo.ui.TreeList

The widget instance which fired the event.

Example - subscribing to the columnMenuOpen event during initialization

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "name" },
      { field: "age" }
    ],
    dataSource: {
      data: [
        { id: 1, parentId: null, name: "Jane Doe", age: 22 },
        { id: 2, parentId: 1, name: "John Doe", age: 24 }
      ]
    },
    columnMenu: true,
    columnMenuOpen: function(e) {
      var menu = e.container.children().data("kendoMenu");
      menu.open(menu.element.find("li:first"));
    }
  });
</script>

Example - subscribing to the columnMenuOpen event after initialization

<div id="treeList"></div>
<script>
  function treelist_columnMenuOpen(e) {
    var menu = e.container.children().data("kendoMenu");
    menu.open(menu.element.find("li:first"));
  }

  $("#treeList").kendoTreeList({
    columns: [
      { field: "name" },
      { field: "age" }
    ],
    dataSource: {
      data: [
        { id: 1, parentId: null, name: "Jane Doe", age: 22 },
        { id: 2, parentId: 1, name: "John Doe", age: 24 }
      ]
    },
    columnMenu: true
  });

  var treelist = $("#treeList").data("kendoTreeList");
  treelist.bind("columnMenuOpen", treelist_columnMenuOpen);
</script>
In this article