I want to program a water supply pipeline network in a treeview control. It has five node (junctions). The parent-child relation is based on a parameter (say pressure).

Initially, the node 1 is parent and its child nodes are 2 and 3. The node 3 has child nodes 4 and 5.

At run time the pressure changes. Now, node 3 is parent and its child nodes are 1, 4 and 5. The node 1 has child node 2.

It could be easier to show in a figure, but I donot know the procedure to attach or insert a figure. sorry.

Please advise me to handle such changes in the paren-child nodes relation in the treeview control.

Thanks