R
RP
I have an Access Table with following columns:
GID (auto number)
PID number
TreeID Text
ItemName Text
This table consists of records in the following manner:
GID PID TreeID ItemName
----- ------ --------- ------------
1 1 001 RootNode
2 2 001001 Books
3 3 001002 CDs
4 4 001003 Phones
5 2 001001001 Fiction
6 2 001001002 Non-Fiction
7 3 001002001 Pop
8 3 001002002 Classic
Here PID is the ParentID and TreeID is the tag that we want to give to
the node.
Here, the root node TreeID is 001. That is the tag of the root node.
It contains nodes, namely: Books, CDs, Phones with incremental TreeIDs
and prefixed with 001 since they belong to root 001.
Now the Books Node (001001) has child nodes Fiction (001001001) and
Non-Fiction (001001002).
Similarly, CDs Node (001002) has child nodes Pop (001002001) and
Classic (001002002).
I want to fill the TreeView control accordingly at run-time.
I am able to make the root and the main nodes within it. But I am not
able to code how the n number of childs will get accomodated.
GID (auto number)
PID number
TreeID Text
ItemName Text
This table consists of records in the following manner:
GID PID TreeID ItemName
----- ------ --------- ------------
1 1 001 RootNode
2 2 001001 Books
3 3 001002 CDs
4 4 001003 Phones
5 2 001001001 Fiction
6 2 001001002 Non-Fiction
7 3 001002001 Pop
8 3 001002002 Classic
Here PID is the ParentID and TreeID is the tag that we want to give to
the node.
Here, the root node TreeID is 001. That is the tag of the root node.
It contains nodes, namely: Books, CDs, Phones with incremental TreeIDs
and prefixed with 001 since they belong to root 001.
Now the Books Node (001001) has child nodes Fiction (001001001) and
Non-Fiction (001001002).
Similarly, CDs Node (001002) has child nodes Pop (001002001) and
Classic (001002002).
I want to fill the TreeView control accordingly at run-time.
I am able to make the root and the main nodes within it. But I am not
able to code how the n number of childs will get accomodated.