The current implementation of the ScrollIntoView
method tries to scroll to the given node so that it is somewhere in the middle of the tree view control. However, this is not exactly the behavior that you need.
You could try implementing that behavior with the following steps:
- Get the first visible node with code like:
(this.radTreeView1.TreeViewElement.Items as TreeNodeUI).AssociatedTreeNode
- Then use a depth first traversal to find the position of the first visible node and of the node that you want to scroll to.
- Finally scroll the tree view control with the difference between the row positions
Hope this helps. I will follow up with some more code later.
the Telerik team