TreeView Control

richardn

Registered User.
Local time
Today, 15:06
Joined
Nov 6, 2001
Messages
49
Hi to everyone,
I need some help about using treeview control.
I have a table (A) with 2 columns : ParentID and ChildID.
The names of ParentID and ChildID are saved in another table (UsersProperties table).
I want to fill the treeview with records from first table(A), so I can see in the first level the Parents Names. When expanding each node I want to see the childs (names) of selected parent, and so for each level.
Each parent can be a child and each child can be a perent.
each parent can have many childrens.
I need to store to fields for each node: the ID number (from table A ) and the Name (this will be the label) from UsersProperties.
Thanks,
Richard
 
richardn said:
Hi to everyone,
I need some help about using treeview control.
I have a table (A) with 2 columns : ParentID and ChildID.
The names of ParentID and ChildID are saved in another table (UsersProperties table).
I want to fill the treeview with records from first table(A), so I can see in the first level the Parents Names. When expanding each node I want to see the childs (names) of selected parent, and so for each level.
Each parent can be a child and each child can be a perent.
each parent can have many childrens.
I need to store to fields for each node: the ID number (from table A ) and the Name (this will be the label) from UsersProperties.
Thanks,
Richard

I can't see the point to using 2 tables, maybe you have another reason for this. There is also no need to store both the ParentID and ChildID. Just a ParentID, the highest tier parent in the tree will then be any record without a parent defined.

I personally found this example a help.

kb 209891
 

Users who are viewing this thread

Back
Top Bottom