Filling Treeview

L

Luis

Hello.
I'm going nuts with a routine that fills a Treeview control.
I have a recordset that i want to use to fill this treeview. The recordset
produces the results shown bellow.
I'm having trouble creating the routine to build the treeview with this
result. The only level that is unique is the level "ELEMENT". There's no need
to check if the element exists.

Can anyone give me a hint?


ROOT_NODE HOST_NODE GUEST_NODE ELEMENT
ROOT_1 HOST_1 GUEST_11 ELEMENT_1
ROOT_1 HOST_1 GUEST_11 ELEMENT_2
ROOT_1 HOST_1 GUEST_12 ELEMENT_3
ROOT_1 HOST_2 GUEST_21 ELEMENT_4
ROOT_1 HOST_2 GUEST_21 ELEMENT_5
ROOT_1 HOST_2 GUEST_22 ELEMENT_6
ROOT_1 HOST_2 GUEST_22 ELEMENT_7
ROOT_1 HOST_3 GUEST_31 ELEMENT_8
ROOT_1 HOST_3 GUEST_31 ELEMENT_9
ROOT_1 HOST_3 GUEST_32 ELEMENT_10
ROOT_1 HOST_3 GUEST_32 ELEMENT_11
ROOT_2 HOST_1 GUEST_11 ELEMENT_12
ROOT_2 HOST_1 GUEST_11 ELEMENT_13
ROOT_2 HOST_1 GUEST_12 ELEMENT_14
ROOT_2 HOST_2 GUEST_21 ELEMENT_15
ROOT_2 HOST_2 GUEST_21 ELEMENT_16
ROOT_2 HOST_2 GUEST_22 ELEMENT_17
ROOT_2 HOST_3 GUEST_31 ELEMENT_18
ROOT_2 HOST_3 GUEST_31 ELEMENT_19
ROOT_2 HOST_3 GUEST_32 ELEMENT_20
 
D

Dorian

You'll need to tell us how your columns relate to the positions in the tree.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
L

Luis

You're right. My mistake.

The tree must be built with the structure bellow. Hope this will help.

+ROOT_1
+HOST_1
+GUEST_11
ELEMENT_1
ELEMENT_2
+GUEST_12
ELEMENT_3
+HOST_2
+GUEST_21
ELEMENT_4
ELEMENT_5
........
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top