select

Triggered when a node is being selected by the user. Cancellable.

Event Data

e.node Element

The selected node

Example - subscribe to the "select" event during initialization

<div id="treeview"></div>
<script>
$("#treeview").kendoTreeView({
  dataSource: [
    { text: "foo", items: [
      { text: "bar" }
    ] }
  ],
  select: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Selecting", e.node);
  }
});
</script>

Example - subscribe to the "select" event after initialization

<div id="treeview"></div>
<script>
function tree_select(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log("select", e.node);
}
$("#treeview").kendoTreeView({
  dataSource: [
    { text: "foo", items: [
      { text: "bar" }
    ] }
  ]
});
var treeview = $("#treeview").data("kendoTreeView");
treeview.bind("select", tree_select);
</script>
In this article