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

Drop item only outside of TreeView

2 Answers 25 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 1
Ivan asked on 04 Dec 2013, 09:54 AM
Hello,

i would like to only enable drag/drop effects outside of the TreeView. That means, when i drag the TreeViewItem inside TreeView, the DragDropEffects should be None, when the mouse is out of the TreeView, drop effects will be allowed.
1). I have tried the RadTreeView_ItemPrepared and set the PreparedItem.AllowDrop = false. But i can also drag a TreeViewItem and drop it after last TreeViewItem.
2). I tried to set DropPosition property of TreeViewDragDropOptions. But it could only be set to Inside :(

Any idea? Thanks.

Ivan

2 Answers, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 06 Dec 2013, 03:26 PM
Hi Ivan,

To achieve this custom requirement you can use the events of the DragDropManager. You can explore our DragDrop section in the RadTreeView's online help. Its last article demonstrates how to deny a drop at certain places in the Tree. We believe it can help you proceed further.

Regards,
Petar Mladenov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ivan
Top achievements
Rank 1
answered on 06 Dec 2013, 04:15 PM
Hi Petar,

thanks, that works.

Ivan
Tags
TreeView
Asked by
Ivan
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Ivan
Top achievements
Rank 1
Share this question
or