Click here to Skip to main content
15,893,266 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

I have table with columns name and parent id.

I know treeview adding like below code,..
treeView1.Nodes.Add(Reader[3].ToString(), Reader[1].ToString());

treeView1.Nodes[3].Nodes.Add(Reader[3].ToString(), Reader[1].ToString());


So each nodes I want handle this adding.


I saw some one code like,.

foreach(TreeNode item in treeView.Nodes)


Is it possible with one line adding code in Treeview Inset Data.
Posted

1 solution

 
Share this answer
 
v3
Comments
Sagotharan Jagadeeswaran 28-Jan-12 6:18am    
Hi Sir, Its Datagrid, I am Asking About TreeView Controls.
ambarishtv 28-Jan-12 7:24am    
i updated solution

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