get the expanding node in a treeview

Posted by Iulian on Stack Overflow See other posts from Stack Overflow or by Iulian
Published on 2010-04-15T11:01:50Z Indexed on 2010/04/15 11:03 UTC
Read the original article Hit count: 402

Filed under:
|

I have a treeview control that functions like a folder browser. Because loading the entire folder structer from disk is taking a lot of time i'm trying to load only one level at a time. So i have a function that adds nodes for all the folders in the current node.

I thought that the best method would be to run it on the BeforeExpand event of the treeview.

UpdateTreeView(TreeView.SelectedNode);

is not working because clicking the + sign to expand is not selecting the node also.

So how to find the node that is expanding.

© Stack Overflow or respective owner

Related posts about c#

Related posts about treeview