scrollIntoView not working

11 posts, 0 answers
  1. Som
    Som avatar
    35 posts
    Member since:
    Oct 2007

    Posted 14 Feb 2008 Link to this post

    I am using "ServerSide" expand mode and using the following code to scroll to the last expanded node, but it is not working: 

            function ScrollToSelectedNode()
            {
                    var tree = $find("<%= RadTreeView1.ClientID %>");
                    //this was not working. so i used a hidden control to store the value of the last node clicked.
                    //var selectedNode = treeviewInstance.SelectedNode;
                    //The value of the expandedNode is set in the RadTreeView1_NodeExpand event on the server side
                   var selectedNode = tree.findNodeByValue(document.getElementById("expandedNode").value);
                   if (selectedNode != null)
                   {
                    selectedNode.select();
                    selectedNode.scrollIntoView();
                    //window.setTimeout(function() { selectedNode.scrollIntoView(); }, 200);
                    }
            }


    I will appreciate if you please help me out here.
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 18 Feb 2008 Link to this post

    Hello Som,

    Could you open a formal support ticket and send us a sample project where the problem occurs? This way it would be easier for us to trace the problem and eventually find a resolution.

    Thank you in advance.

    Regards,
    Simon
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Markus
    Markus avatar
    103 posts
    Member since:
    Dec 2007

    Posted 15 May 2008 Link to this post

    has this issue been solved in any way?

    I'm struggeling too with this "scrollIntoView" method. My treeview is inside a radpanelbar
  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 15 May 2008 Link to this post

    Hi Markus,

    We have recently resolved an issue with the scrollIntoView function. Still, we did not get a chance to examine Som's case and I am not sure the problem he referred to is the same as the one we have resolved.

    I suggest you upgrade to the latest version of RadTreeView which should be available in a couple of hours.

    If the problem still persists, feel free to send a Bug Report describing how it can be reproduced; a sample project will be of a great help. We will examine it right away.

    Kind regards,
    Simon
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Markus
    Markus avatar
    103 posts
    Member since:
    Dec 2007

    Posted 16 May 2008 Link to this post

    Hi!

    Just to be sure that I use the method in the right manner:

    I have a node which is outside the visible area of the treeview, I call node.scrollIntoView() and actually the treeview should scroll down until the node is visible, right ?

    With the new version it is still not working, I will try to set up a sample project where this occurs. I can't sent you the application itself ;-)

    edit: is there a workaround in the meantime? lets say getting the parent div element and use the javascript scrollTo(x,y) method ?
  7. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 19 May 2008 Link to this post

    Hello Markus,

    Which was the version you tested with?

    In the latest version this bug has been resolved, scrollIntoView should scroll to the caller Node as expected. Still, if you experience problems, could you send a simple project which exhibits them? We will examine it right away.

    Best wishes,
    Simon
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Markus
    Markus avatar
    103 posts
    Member since:
    Dec 2007

    Posted 19 May 2008 Link to this post

    I'm using this version: 2008.1.515.35
  9. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 19 May 2008 Link to this post

    Hi Markus,

    I tried once again with the latest version of Telerik.Web.UI - v2008.1.515.35 and everything worked as expected.

    I have attached the test project, so that you could check it out for yourself.

    Please see this topic for more information about using the scrollIntoView function.

    If you still experience the problem, please open a support ticket and send us a project demonstrating it. We will examine it and try to provide a solution/workaround.

    Sincerely yours,
    Simon
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. Markus
    Markus avatar
    103 posts
    Member since:
    Dec 2007

    Posted 19 May 2008 Link to this post

    Thanks for your quick response.
    In the meantime I know these articles by heart ;-)

    anyway, I'll try setting up a sample project that reproduces the error!


  11. Markus
    Markus avatar
    103 posts
    Member since:
    Dec 2007

    Posted 30 Sep 2008 Link to this post

    Finally I found some time to care about this issues again.

    The problem in my case was that the rad tree actually obtained the height it needed to display all nodes, but the scrollbars resulted from the parentcontainer. In my example a radmultipage with a fix height.

    The scrollIntoView() method cant scroll its parent, unfortunately.

    kind regards,
     markus


  12. Nicolaï
    Nicolaï avatar
    160 posts
    Member since:
    Apr 2008

    Posted 22 Mar 2013 Link to this post

    Landed here while... obviously... trying to solve a "scrollIntoView not working"..
    In my case, specifying height on the treeview helped (nested as combo item)
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017