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

Dragging a node make the tree scroll

4 Answers 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 15 Sep 2009, 07:33 AM
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

4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 18 Sep 2009, 07:22 AM
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.
0
Simon Hancock
Top achievements
Rank 1
answered on 08 Dec 2009, 04:52 PM
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.

0
Nicolas
Top achievements
Rank 1
answered on 09 Dec 2009, 09:43 AM
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.


0
Simon Hancock
Top achievements
Rank 1
answered on 09 Dec 2009, 02:40 PM
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
Tags
TreeView
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Yana
Telerik team
Simon Hancock
Top achievements
Rank 1
Nicolas
Top achievements
Rank 1
Share this question
or