This blog defines 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);