Edit this page

select

Gets or sets the selected node.

Parameters

node jQuery |Element |String (optional)

If provided, the node that should be selected.

Returns

jQuery The currently selected node.

Example

<div id="treeview"></div>
<script>
$("#treeview").kendoTreeView({
  dataSource: [
    { text: "foo", items: [
      { text: "bar" }
    ] }
  ]
});

var treeview = $("#treeview").data("kendoTreeView");

var bar = treeview.findByText("bar");
treeview.select(bar);

console.log(treeview.text(treeview.select())); // logs "bar"

treeview.select($()); // clears selection
</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