TreeNode beforeExpand Operation
Hi all!
I would like to dynamically populate my tree. In order to do that, I would like to use the event beforeExpand.
When the user clicks on the node plus signal, I would like that my app requests some information, and so, it will add some children to the expanded node.
The problem is that I don't know how can I get the expanded node. How do I do it?
Thank you!
Re: TreeNode beforeExpand Operation
In the event handler, use e.Node.
e is the TreeViewCancelEventArgs parameter passed to the event handler.
Re: TreeNode beforeExpand Operation
What kind of tree control do you use? If it is the VS native one, than the BeforeExpand event has an argument of TreeViewCancelEventArgs type, which contains Node property. This Node is the node you are interested in.