Can someone show me how to populate a treeview to achieve the following:
Customer
ABC Ltd
Head Office
Central Office
XYZ Ltd
Head Office
It's driving me a bit nuts at the moment.
Thanks in Advance and Merry Xmas
:)
Printable View
Can someone show me how to populate a treeview to achieve the following:
Customer
ABC Ltd
Head Office
Central Office
XYZ Ltd
Head Office
It's driving me a bit nuts at the moment.
Thanks in Advance and Merry Xmas
:)
It should look like:
Customer
--->ABC Ltd
---------->Head Office
---------->Central Office
--->XYZ Ltd
---------->Head Office
Add the 'Head Office' and 'Central Office' nodes to the 'ABC Ltd' Node then add it to the 'Customer' Node.
Then do basically the same thing for the other.
Customer must be the parent node
ABC Ltd
XYZ Ltd
these tow must be child nodes for the parent Customer
Head Office
Central Office
child nodes for the inherited child (ABC Ltd)
and so on ....
1-(Parent)
Customer
2- (Child)
--->ABC Ltd
3- (Child)
---------->Head Office
---------->Central Office
2- (Child)
--->XYZ Ltd
3- (Child)
---------->Head Office
The treeview index works as follows
1 (customers)
------>1(ABC Ltd)
----------->1(Head Office)
----------->2(Central Office)
------->2(XYZ ltd)
----------->3(Head Office)
----------->4(Central Office)
So when adding you must keep a record of the index of the parent node of that particular node.