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

RadTreeView Drag only

1 Answer 71 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Su
Top achievements
Rank 1
Su asked on 15 Oct 2010, 02:15 PM
Hi,

I use RadTreeView to display the content in a hierarchical structure. An item in the tree is dragged onto another control which is working. The thing which I want to disable is altering the structure of the tree by dragging the items within the tree. How can I do this?

The tree items are bound to a collection & use ItemTemplate to display the items.

Thank you.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 19 Oct 2010, 02:16 PM
Hi Su,

You can attach a class handler for the tree view to DropQueryEvent of the RadDragAndDropManager (with last parameter true). In the attached handler you can implement the required logic to allow or forbid the drop operation. The attached project demonstrates described solution. Also, it contains a commented code which demonstrates a slightly different approach. You can employ this one that best fits your needs.

Please let us know if you need more info or the solution is not what you were looking for.

Sincerely yours,
Hristo
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
Su
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or