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

Determine if Node is Expanding or Contracting in NodeExpandedChanging Event

2 Answers 21 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 20 Feb 2014, 10:34 PM
Is there a way to determine whether a node is expanding or collapsing when handling the NodeExpandedChanging event?

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 24 Feb 2014, 07:13 AM
Hello Paul,

Thank you for writing. 

The NodeExpandedChanged event gets triggered when the expanded state of a node is changed, so you can check the e.Node.Expanded state and if it is true, this means that the node was not expanded and it now is. On the contrary, if is it false, this means that the node was expanded and not is it not.

I hope this helps. 

Regards,
Stefan
Telerik
0
Paul
Top achievements
Rank 1
answered on 24 Feb 2014, 05:07 PM
Thanks. Not sure how I missed the Expanded property. Since I'm using the NodeExpandedChanging event, I just make sure Expanded is false to verity that the node is currently expanding.
Tags
Treeview
Asked by
Paul
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Paul
Top achievements
Rank 1
Share this question
or