Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

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
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

what is the link between these 2 arrays? how do you know which names are going under which parents?
Avatar of Murray Brown

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)
still not clear to me! what are S1, P1, S2, ... Where is "demos" in your result?
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks very much