I want to use event ( onSelect) to help me (expand or Collapse ) one node in treeview pls hepl me do it.
my code here:
(
function onSelect(e){
if (this.dataItem(e.node) != null) {
this.expand(e.node);
this.collapse(e.node);
}
}
)
2 Answers, 1 is accepted
0
Kiril Nikolov
Telerik team
answered on 29 Jul 2013, 01:55 PM
Hello Butter,
You need to use an instance of the TreeView and use its .expand() and .collapse() methods to perform the functionality you need. You can check for the data-expanded attributed in order to determine of give node is expanded or note. For your convenience here is a jsBin example which demonstrates a possible implementation.
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!