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

Dropping on the root of the TreeView

1 Answer 82 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
alino
Top achievements
Rank 1
alino asked on 27 Oct 2010, 10:13 PM
Hi,

I have a problem about how i can control the dropping an Item before or after the root of the RadTreeView.  In my application, some item are not allowed to be dropped before or after a root (i.e some items can not be roots when I have man roots in the treeView).
I can Control the inside dropping using  "IsDropAllowed"  property of the TreeViewItem.

How can I control the "Before"  and "After" dropping?

Thank U for your help.

Alino

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 01 Nov 2010, 05:34 PM
Hi alino,

You can handle the PreviewDragEnded event of the RadTreeView and  to implement your custom drag and drop logic. I prepared a sample project demonstrating the functionality you have described. You can drag items from the left RadTreeView and drop them in the right RadTreeView  in order to build an entire new tree. You are able to create siblings of your first  root node and children nodes everywhere in the tree.

Please examine the attached solution and let me know if it helps you. 

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