Edit this page

findByUid

Searches for a node with the given unique identifier. Applicable when the widget is bound to a HierarchicalDataSource. If you want to find a node by its id, use the dataSource.get() method and supply its uid to the findByUid method.

Parameters

uid String

The uid that is being searched for.

Returns

jQuery The found node, wrapped in jQuery object.

Example

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

var treeview = $("#treeview").data("kendoTreeView");
var barDataItem = treeview.dataSource.get(2);
var barElement = treeview.findByUid(barDataItem.uid);
console.log(barElement);
</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