Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
How do I show a list of properities when I right click on a node in a TreeView control to add a new Node?
Posted
Updated 1-Dec-10 23:57pm
v2

you can add child node by a button instead right click!
 
Share this answer
 
MIDL
Code copied from Md. Marufuzzaman.


TreeNode treeNodeRoot = new TreeNode(ObjGlobal.ServerIP + " " + ObjGlobal.Port, "S", "~/App_Themes/SQL/Images/DBServer.png", "Default.aspx", "");
this.tvSQLServer.Nodes.Add(treeNodeRoot);
TreeNode treeNodeBranches = new TreeNode("Database", "C", "~/App_Themes/SQL/Images/Folder.png", "Default.aspx", "");
treeNodeRoot.ChildNodes.Add(treeNodeBranches);
 
Share this answer
 
v2
Comments
Toli Cuturicu 2-Dec-10 12:43pm    
More than awful.

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