PC Review


Reply
Thread Tools Rate Thread

Add a subnode to every node in a treeview

 
 
Darren
Guest
Posts: n/a
 
      18th Nov 2003
Hi, two questions, first I'm tryng to add a subnode to every node in a
treeview so that it will display the expand icon, however I can't work out
how to do it.

Second, its kind of related, how do I add a subnode to a selected node at
runtime.

Thanks
 
Reply With Quote
 
 
 
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      18th Nov 2003
1)
for each node as TreeNode in treeView1.Nodes
node.Nodes.Add(new TreeNode("Bob"))
next node

2) see 1

"Darren" <(E-Mail Removed)> wrote in message
news:Xns9437E58CFC391someonecom@207.46.248.16...
> Hi, two questions, first I'm tryng to add a subnode to every node in a
> treeview so that it will display the expand icon, however I can't work out
> how to do it.
>
> Second, its kind of related, how do I add a subnode to a selected node at
> runtime.
>
> Thanks



 
Reply With Quote
 
Darren
Guest
Posts: n/a
 
      19th Nov 2003
Perfect, thanks again


"Alex Feinman [MVP]" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> 1)
> for each node as TreeNode in treeView1.Nodes
> node.Nodes.Add(new TreeNode("Bob"))
> next node
>
> 2) see 1
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Expand any node then other node collaps using JS - Treeview Contro Manoj Microsoft ASP .NET 0 4th Nov 2008 01:35 PM
Treeview : Adding a node to a specific existing node with Net 1.0(work with 2.0) michelqa@yahoo.ca Microsoft C# .NET 2 12th Jun 2008 08:18 AM
Treeview Subnode Name - Return Name Some Person Microsoft Dot NET Framework Forms 1 10th Dec 2007 07:03 AM
How to find node in TreeView by using string(the same as Node.Text) ? jiing Microsoft ASP .NET 0 27th Apr 2007 03:34 AM
Context menu popup on treeview node returning wrong selected node Claire Microsoft C# .NET 2 5th Mar 2007 11:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:43 AM.