ScrollControlIntoView doesn't work

2 posts, 0 answers
  1. Dawid
    Dawid avatar
    9 posts
    Member since:
    Dec 2008

    Posted 29 Aug 2011 Link to this post

    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);
  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 01 Sep 2011 Link to this post

    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 >>

  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top