Click here to Skip to main content
16,004,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i want to find the text of each node of a tree view controll and want to store that text in a array please help me on this
Posted

1 solution

C#
ArrayList al = new ArrayList();
       foreach (TreeNode tn in treeView1.Nodes)
       {
           al.Add(tn.Text);
       }
 
Share this answer
 
Comments
rahuls1 5-Mar-13 7:08am    
this is adding only the parent node not its child node

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