简体   繁体   English

获取树节点的所有uid

[英]Get all the uid of the tree nodes

I am using kendo treeview. 我正在使用剑道树视图。 I need to get all the datasource with all the uid of all nodes (not just of those showing but also the collapsed ones). 我需要获取所有数据源以及所有节点的所有uid(不仅是显示节点的uid,还包括折叠节点的uid)。 I use this way to get the datasource : 我使用这种方式来获取数据源:

dataSource = treeElement.data("kendoTreeView").dataSource.data()

And I get an object with only the current showing nodes there. 我得到一个对象,那里只有当前显示的节点。 I can see that at : 我可以在看到:

treeElement.data("kendoTreeView").dataSource.options.data

all the nodes show but not their uid. 所有节点都显示,但不显示其uid。 It's just an array of my data. 这只是我的数据数组。

Any suggestion how to achieve this? 任何建议如何实现这一目标? Again I need an object with all the nodes and their uid that kendo uses. 同样,我需要一个具有kendo使用的所有节点及其uid的对象。

Just in case anyone comes to this question. 以防万一有人遇到这个问题。 I solved it by setting loadOnDemand: false to the kendoTreeView configuration 我通过将loadOnDemand: false设置为kendoTreeView配置来解决它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM