Hi
I have 2 ultratrees side-by-side with the same number of rows.
How do I keep them in sync?
Hi,
There's no simple way to do this unless you can find the matching node in the other tree. So if your tree's both contain the same nodes with the same keys, then you could trap the events of the first tree like AfterExpand and AfterCollapse. Then you could find the matching node in the other tree and expand/collapse it as appropriate.
For scrolling, you would do the same thing using the Scroll event of the tree and set the FirstNode property of the other tree to the matching node in the current tree.
If the nodes have keys, then finding the node in the other tree is pretty easy, you can use the tree.GetNodeByKey method. If your nodes are not keyed, then you would have to use the node indices and walk down the hierarchy recursively to find the matching node in the other tree.
Under which class is the FirstNode property?