Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

i want select root node of tree view. so plz help me to get the root node of treeview...

thanx
Posted

1 solution

C#
TreeNodeCollection nodes = tvwFolders.Nodes;
if (nodes.Count > 0)
{
// Select the root node
tvwFolders.SelectedNode = nodes[0];
}
 
Share this answer
 
Comments
JustWorking 7-Jun-11 8:42am    
PS: If you like my answer click Accept Solution and vote 5 :)
Sergey Alexandrovich Kryukov 7-Jun-11 14:24pm    
Passed. My 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900