473,466 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Why won't this work in adding nodes to a treeview in a VB.NET Windows Application

Hello Everyone

tvServices.Nodes.Add("M1", "Parent")
tvServices.Nodes("M1").Nodes.Add("S1", "Child")
tvServices.Nodes("S1").Nodes.Add("x1", "Grand Child")

The 1st 2 lines work fine but why doesn't the 3 line find the node from line
2

Thanks
Mark
Oct 14 '07 #1
2 1379
"MarkS" <te*****@sbcglobal.netschrieb
Hello Everyone

tvServices.Nodes.Add("M1", "Parent")
tvServices.Nodes("M1").Nodes.Add("S1", "Child")
tvServices.Nodes("S1").Nodes.Add("x1", "Grand Child")

The 1st 2 lines work fine but why doesn't the 3 line find the node
from line 2
tvServices.Nodes("M1").Nodes("S1").Nodes.Add("x1", "Grand Child")
Armin
Oct 14 '07 #2
DOH, my mistake there...
"Armin Zingler" <az*******@freenet.dewrote in message
news:O6***************@TK2MSFTNGP06.phx.gbl...
"MarkS" <te*****@sbcglobal.netschrieb
>Hello Everyone

tvServices.Nodes.Add("M1", "Parent")
tvServices.Nodes("M1").Nodes.Add("S1", "Child")
tvServices.Nodes("S1").Nodes.Add("x1", "Grand Child")

The 1st 2 lines work fine but why doesn't the 3 line find the node
from line 2

tvServices.Nodes("M1").Nodes("S1").Nodes.Add("x1", "Grand Child")
Armin
Oct 14 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: bob | last post by:
Hello, the nodes in my tree view show a name and then a suffix. I want to be able to edit the name using 'label edit' but I want the suffix to be removed and then added after the edit. I try...
4
by: pmcguire | last post by:
I have a treeview with a lot of nodes. I want to load only the nodes that are initially visible when the form loads, and then continue to populate it in background and/or when the nodes are required...
3
by: LC | last post by:
Hello all, Ive been using the treeview and for testing purpose i have created 2 Parent Nodes and 5 child nodes within each parent node i.e.- CN = Child Node Parent Node - CN - CN - CN
2
by: Jack | last post by:
Hello, I am trying use a TreeView with checkboxes. I would like to check more than one node and allow all child nodes of selected nodes to be checked or unchecked with the parent is checked. ...
2
by: metaperl | last post by:
Hello, I'm trying to get the MSDN documentation example of a treeview to work: http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.aspx I made the function static and added a...
3
by: WISara | last post by:
Hi all - I'm kind of a newbie. I've been researching this problem for a couple of days now and my searches haven't really come up with any solutions - hopefully I'm just doing something silly and...
6
by: SQACSharp | last post by:
I'm using the EnumChildWindows API with an EnumChildWndProc callback to populate the treeview. The output will be something similar to spy+ + How can I specify the parent when adding a new node...
1
by: Bart Steur | last post by:
Hi As a VB6 user I'm unfamiliar with the Treeview control of VB2005. I read it was changed but I have a hard time finding the right help/samples for my problem. In VB6 you had 1 collection,...
2
by: michelqa | last post by:
Hi, I'm trying to add nodes to a specific node of a treeview. With VS 2005 and more (>= .net 2.0) I can set the Nodes.Name property and then use Nodes.Find("MyNodeName",true) to add nodes to a...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.