|
-
May 28th, 2008, 02:08 PM
#1
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!
-
May 28th, 2008, 02:27 PM
#2
Re: TreeNode beforeExpand Operation
In the event handler, use e.Node.
e is the TreeViewCancelEventArgs parameter passed to the event handler.
-
May 28th, 2008, 02:31 PM
#3
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.
- Make it run.
- Make it right.
- Make it fast.
Don't hesitate to rate my post. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|