문제

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

도움이 되었습니까?

해결책

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);

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top