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

Radtreeview, the drop event doesnt fire, only the previewdrop event

2 Answers 94 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Annett
Top achievements
Rank 1
Annett asked on 20 Sep 2011, 02:24 PM
Hi,

i have a radtreeview filled with hierarchicaldata. In code i do the settings.

            _radTreeView = projectTreeView._xTreeView;
            _radTreeView.AllowDrop = true;

            _radTreeView.Drop += TreeViewDrop;
            _radTreeView.PreviewDrop += TreeViewPreviewDrop;
            _radTreeView.DragOver += ....


If i drop an item the dropevent doesnt fire. Temporarily i solved this and work with the previewdropevent. But i dont like this solution. Have anyone ideas where my problem is? Some points that i must check?

Thanks
Annett

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 21 Sep 2011, 04:01 PM
Hello Annett,

The RadTreeView actually uses and handles the Drag Drop events. Still they can be used for managing the drag and drop process, too. You should use the AddHandler() method of the TreeView with the handledEventsToo parameter set to 'true'. 

public void AddHandler( RoutedEvent routedEvent, Delegate handler, boolhandledEventsToo );

In the API Reference you can see that the Drop event is inherited from System.Windows.UIElement


Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Annett
Top achievements
Rank 1
answered on 21 Sep 2011, 07:24 PM
Hello Didie,

thanks, it works great. I am happy. Thank you.

Annett
Tags
DragAndDrop
Asked by
Annett
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Annett
Top achievements
Rank 1
Share this question
or