kendo treeview get element code example

Example: kendo treeview get element

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

// Here the id is from your treeview schema:

// schema: { model: { id: 0, text: "Root" } }

// If your treeview doesn't have a schema,
// convert it to use a hierarchical datasource:
// https://docs.telerik.com/kendo-ui/framework/datasource/hierarchical

var nodeDataItem = treeview.dataSource.get(id);
var node = treeview.findByUid(nodeDataItem.uid);

treeview.select(node);