How to Add Nodes in the TreeView Programmatically

Nodes can be added programmatically as follows:

C#

TreeViewNode rootNode=new TreeViewNode();

rootNode.Text="MailBox";

rootNode.Expanded=true;

rootNode.ImagePath="root.gif";

TreeView1.Items.Add(rootNode);

Ebook Download
View all
Learn
View all