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

Reordering with Drag & Drop

1 Answer 22 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ty
Top achievements
Rank 1
Ty asked on 08 Jun 2010, 03:31 PM
Hi,

I would like to make it so that when a user drags and drops a node they can only drop that node above or below other nodes, and not on top.  Basically, I want them to be able to only reorder the nodes using drag & drop and not modify the hierarchy of the TreeView.

I know I can achieve this functionality using the OnClientNodeDropping event, but it is very tedious for the user because the area to drop a node above or below another node is only a few pixels high.  I want the dragging and dropping to work like it does with a RadListBox: there is always an arrow showing where the item will be dropped, even if the item you are dragging is directly on top of the destination item.

What is the easiest way to achieve this?

Thank you for your help.

1 Answer, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 11 Jun 2010, 12:51 PM
Hello Ty,

I'm afraid there's no easy way to completely disable the drop over nodes. However you can use the OnClientNodeDragging event to change the mouse cursor and indicate that the node can't be dropped over other nodes.

Also, dragging below or above another node is easier when the mouse cursor is moved over the node lines.

I hope this helps.

All the best,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TreeView
Asked by
Ty
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or