This is a migrated thread and some comments may be shown as answers.

How do i check if the node is expanded

1 Answer 425 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Svetlin
Top achievements
Rank 1
Svetlin asked on 15 Nov 2013, 05:12 PM
I want to collapse the node on single click. To do that i need to know if the node is expanded so i can call collapse(e.node)

Thanks a lot team

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 18 Nov 2013, 08:11 AM
Hello Svetlin,


You could get this information from the data-expanded attribute of the nodes.
E.g.
var isExpanded = $(node).attr("data-expanded");
 
if (typeof isExpanded !== 'undefined' && isExpanded !== false) {
    // ...
}

I wish you a great day!

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Svetlin
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or