Murray Brown
asked on
VB.net building a TreeView from two arrays
Hi
I have two arrays arrName(100) and arrParent(100)
I need to build a TreeView where the name (held in arrName) is added to the Parent node (held in arrParent)
How do I loop through and do this
I have two arrays arrName(100) and arrParent(100)
I need to build a TreeView where the name (held in arrName) is added to the Parent node (held in arrParent)
How do I loop through and do this
what is the link between these 2 arrays? how do you know which names are going under which parents?
ASKER
The first string contains the name and the second one shows which parent it goes under
so as an example, if I have
S1 = "demos"
P1 = nothing
S2 = "demo1"
P2 = "demo"
S3 = "demo2"
P3 = "demo"
then I would get
-----demo (parent node)
-------- demo1 (child node 1)
-------- demo2 (child node 2)
so as an example, if I have
S1 = "demos"
P1 = nothing
S2 = "demo1"
P2 = "demo"
S3 = "demo2"
P3 = "demo"
then I would get
-----demo (parent node)
-------- demo1 (child node 1)
-------- demo2 (child node 2)
still not clear to me! what are S1, P1, S2, ... Where is "demos" in your result?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks very much