How do i check if the node is expanded in Kendo treeView

泪湿孤枕 提交于 2020-01-15 11:31:09

问题


I have a Kendo treeView. I want to collapse the node on single click (the default is on double click). To do that I need to know if the node is expanded already so I can call collapse(e.node). So, how do I check if the node has been expanded already?

Thanks a lot


回答1:


You can test with $(e.node).attr("data-expanded") === "true" or kendoTreeView._expanded(e.node), however if your goal is to collapse/expand depending on the current state, you can simply call

kendoTreeView.toggle(e.node);



来源:https://stackoverflow.com/questions/20006877/how-do-i-check-if-the-node-is-expanded-in-kendo-treeview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!