New to Kendo UI for jQueryStart a free 30-day trial

FindByUid

methods

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:uidString

The uid that is being searched for.

Returns:jQuery

The found node, wrapped in jQuery object.

<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);
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(barElement);
</script>
Not finding the help you need?
Contact Support