Dragging a node make the tree scroll

5 posts, 0 answers
  1. Nicolas
    Nicolas avatar
    57 posts
    Member since:
    Dec 2008

    Posted 15 Sep 2009 Link to this post

    Hi,

    I have a Tree within a Dock. What we do is drag a node from the tree and drop it somewhere outside of the dock. The tree is far taller than the dock is, so users have to scroll within the dock to navigate the tree and get to the node they want, which is fine. However, once the dragging operation has started, dragging the node above or below the tree will make it to scroll up or down. Seeing as how in most cases, we drag a node and drop it below the dock (thus below the tree), the result is that each time the dock/tree scrolls all the way down and we have to manually scroll up back to the node we just dragged.

    Is it possible to prevent scrolling when dragging a node?

    Thanks
  2. Yana
    Admin
    Yana avatar
    5013 posts

    Posted 18 Sep 2009 Link to this post

    Hi Nicolas,

    Could you please open a support ticket and send us a simple running project illustrating this issue there, because we're not able to replicate it? Thanks a lot.

    All the best,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Simon Hancock
    Simon Hancock avatar
    2 posts
    Member since:
    Oct 2009

    Posted 08 Dec 2009 Link to this post

    Did anyone ever solve this?

    I also have a RadTreeView and I select a node and drag it to a text box above the treeview and the whole tree scrolls up to the top of the tree list when I drag.

    On the drag start, I save the node selected and on the drag end, I use the ensureAppearance command on the saved node, in hopes the treeview will go back to the selected node, but it doesnt work.

    What would be ideal would be if the treeview scrolling could be locked on the drag start and released after the drag end event.

  4. Nicolas
    Nicolas avatar
    57 posts
    Member since:
    Dec 2008

    Posted 09 Dec 2009 Link to this post

    Hi,

    Telerik came up with this solution, that works:

    <script type="text/javascript">  
        function NodeDragStart(tree, args)  
        {  
            var treeviewList = tree.get_element().firstChild;  
            treeviewList.style.position = "absolute";  
        }  
    </script>  

    I've been able to remove those lines in the latest version of the controls, and the issue did not come back, so I'm guessing it may has been fixed in latest release.


  5. Simon Hancock
    Simon Hancock avatar
    2 posts
    Member since:
    Oct 2009

    Posted 09 Dec 2009 Link to this post

    Thanks for posting Nicolas - that worked almost perfect. The end result is exactly what I am looking for.....

    Only one issue, during my drag the entire list (Tree view list) appears (usually hidden within the box of the control) and overlays the entire page below, which goes away after I do the drop, so almost there.

    I will check for an update for the controls. I am a contractor and I can only use what they give me at this site!

    Thanks again, I am sure I can set some other CSS property to get around my other bug.

    Simon H
Back to Top