This is a migrated thread and some comments may be shown as answers.

ScrollControlIntoView doesn't work

1 Answer 255 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Dawid
Top achievements
Rank 1
Dawid asked on 29 Aug 2011, 07:00 PM
How conditions have to exist that ScrollControlIntoView work?

I've set AutoScroll = true for radTreeViewControl and I call :

       tn  - is a found node

    DirectoryRadTreeView.SelectedNode = tn;
    DirectoryRadTreeView.BringIntoView(tn);
    DirectoryRadTreeView.ScrollControlIntoView(DirectoryRadTreeView);

1 Answer, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 01 Sep 2011, 08:39 AM
Hello Dawid,

Thank you for writing.

There are some issues with the BringIntoView method which we are working on. In order to make the method always work use it as in the following code snippet:

RadTreeNode node = this.radTreeView1.SelectedNode;
this.radTreeView1.CollapseAll();
this.radTreeView1.BringIntoView(node);

This will collapse all the tree branches that are not a part of the path to the node.
Additionally, you do not have to set the AutoScroll property to anything for the BringIntoView method to work and the BringControlIntoView method is intended for the RadTreeView as a control to bring itself into view when it is placed in some scrollable container.

I hope this will help. If you have further questions, I would be glad to help. Kind regards,
Ivan Petrov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Treeview
Asked by
Dawid
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or