我有这个场景。
1) 服务器端返回一个 json 编码的数组,其中包含不同的字段以及主键,即 id。
2)从该json创建 Kendo Treeview
3
我想做这个,
1) 用户浏览树并选择一个节点。
2)我想找到树的主ID或从服务器端传递的任何其他字段以区分所选节点。
我希望我能提出问题。
提前致谢。
最佳答案
将 select
函数定义为:
select : function (e) {
// Get clicked node
var node = e.node;
// Find it's UID
var uid = $(node).closest("li").data("uid");
// Get the item that has this UID
var item = this.dataSource.getByUid(uid);
}
关于php - 从 Kendo Treeview 选择的节点中检索 id,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17677232/