select

Triggered when a node is being selected by the user. Cancellable. When checkboxes are enabled, it is also triggered when a node is being deselected.

Note: We don't recommend using the 'select' event when checkboxes are enabled because it is not triggered when the state of the checkbox is changed.

Event Data

e.node Element

The selected node

Example - subscribe to the "select" event during initialization

<input id="dropdowntree"/>
<script>
$("#dropdowntree").kendoDropDownTree({
  dataSource: [{ text: "item1", value: 1 }, { text: "item2", value: 2 }],
  select: function(e) {
    console.log("Select", e.node);
  }
});
</script>

Example - subscribe to the "select" event after initialization

<input id="dropdowntree"/>
<script>
function dropdowntree_select(e) {
  console.log("select", e.node);
}
$("#dropdowntree").kendoDropDownTree({
  dataSource: [{ text: "item1", value: 1 }, { text: "item2", value: 2 }],
});
var dropdowntree = $("#dropdowntree").data("kendoDropDownTree");
dropdowntree.bind("select", dropdowntree_select);
</script>
In this article
Not finding the help you need? Improve this article