index | search | no replies | posting guidelines | help login | register
Index » General » Site & Forum Feedback
search this forum:
:: Treeview ASP v2 ::    show all messagesPost a New Message | Post a Reply
Aug 5 2008, 2:31 PM
 Re: Treeview ASP v2Post a Reply
 dhepburn

View this author's profile Send this author a private message

since: Jul 30, 2008
from: Sydney, Australia

I played around with this for ages trying all different combinations of code until finally I hit pay dirt!!!  You just keep adding childnodes(0) to get to lower levels. It seems obvious but I couldn't work it out at the time.
For those that need to know how to do this:-

tv.Nodes.Add(tv.CreateSimpleNode("Computers"))
tv.Nodes(0).Add(tv.CreateSimpleNode("Hardware"))
tv.Nodes(0).ChildNodes(0).Add(tv.CreateSimpleNode("CPU"))
tv.Nodes(0).ChildNodes(0).ChildNodes(0).Add(tv.CreateSimpleNode("Intel"))
tv.Nodes(0).ChildNodes(0).ChildNodes(0).ChildNodes(0).Add(tv.CreateSimpleNode("Dual Core"))
tv.Nodes(0).ChildNodes(0).ChildNodes(0).ChildNodes(0).ChildNodes(0).Add(tv.CreateNode("Intel SPX900","http://www.intel.com","whatever"))
tv.Nodes(0).ChildNodes(0).ChildNodes(0).ChildNodes(0).ChildNodes(0).Add(tv.CreateNode("Intel RRD5000","http://www.intel.com","whatever"))


Pages: (1)   [1]

search this forum: