📜  kendo treeview 获取元素 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:09.286000             🧑  作者: Mango

代码示例1
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);