Click here to Skip to main content
15,914,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to find a node in treeview at runtime, in which that node can be at any level.

How to select that node programatically.

Plz.. answer if anyone knows....
Posted

 
Share this answer
 
Comments
Espen Harlinn 29-Oct-11 8:28am    
Good link :)
Mehdi Gholam 29-Oct-11 8:31am    
Cheers
hi
pls try with this ...

C#
foreach (TreeNode parent in TreeView1.Nodes)
       {
           foreach (TreeNode child in parent.ChildNodes)
           {
               if (child.Checked)
               {
                   parent.Value  //for the Parent Nodes values.
                  child.Value    // for the Child Nodes values.          
                }
           }
       }
 
Share this answer
 

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