Scrolling during drag and drop

4 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 26 Jul 2011 Link to this post

    I've a TreeView in a RadSplitterPane.

    The TreeView is set to allow drag and drop.

    ATM, I can only drag to a node I can see at the beginning of the drag and drop operation as I seem unable to get either to TreeView or the SplitterPane to scroll.

    Is there, actually, a way to do this?

  2. Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 29 Jul 2011 Link to this post

    Hi Stuart,

    As you have noticed the container wrapping the RadTreeView is not scrolling, which is expected behavior since the user could scroll using the mouse while dragging.

    The desired functionality could be achieve using custom implementation. You should monitor the cursor position on the page and if cursor is near the bottom or top of the container, you should scroll it manually.

    Dimitar Terziev
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. DevCraft R3 2016 release webinar banner
  4. Scott
    Scott avatar
    1 posts
    Member since:
    Apr 2011

    Posted 19 Dec 2011 Link to this post

    I'm having the exact same problem.  I have a RadTreeView in a RadSplitter Pane.  Both are within an iFrame.  I also have a manual scroll using the scrollBy method in Window.  When the dragged node reaches the bottom, instead of scrolling the pane, it scrolls the entire frame, not the TreeView.  Here's the Javascript:

    function onNodeDragging(sender, args)
        var target = args.get_htmlElement();    
        if(!target) return;
        if (target.tagName == "INPUT")
   = "hand";
        var container = sender.get_element();
        var divYCoord = $telerik.getLocation(container).y;
        var currentYCoord = args.get_domEvent().clientY;
        var textbox = $get("textbox");
        if (currentYCoord > (document.body.clientHeight - 20))
            window.scrollBy(0, 20);
        if(currentYCoord < 620)
            window.scrollBy(0, -20);
        window.status = "RadPane1.clientHeight:" + radPane1.clientHeight + ":document.body.clientHeight:" + document.body.clientHeight + ":currentYCoord:" + currentYCoord + ":document.body.scrollTop:" + document.body.scrollTop + ":iTop:" + (currentYCoord - document.body.scrollTop) + ":" + args.get_domEvent().screenY + ":" + divYCoord;


  5. Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 22 Dec 2011 Link to this post

    Hi Scott,

    Since you have opened a support ticket regarding this issue, lets keep the discussing there until we find a solution.

    All the best,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top