We are sorry for the caused confusion. We'll try to update our online help in the next days, but until then I'll try to explain you which of our controls you may use and the best approach to use them.
is obsolete and we recommend you to use DragDropManager
instead. The DragDropManager
has several events (very similar to Microsoft's DragDrop scenarios) that can be used through the operation. They are explained in our online help here
When using DragDropManager you can follow the steps below to implement a simple scenario in which you just want to drag from a source to a target and you want to set your own custom DragVisualElement to show while dragging the data.
1) Identify the element that will be a drag source. A drag source can be a UIElement or a ContentElement. Set the following property to true:
2) Add a DragInitialize event handler to the source object. In this event you should set the data that will be dragged and dropped, and also your DragVisual.
sender, DragInitializeEventArgs args)
args.Handled = true;
4) If you want you can add a GiveFeedback handler to set the mouse cursor. This event is raised continuously while dragging:
sender, Telerik.Windows.DragDrop.GiveFeedbackEventArgs args)
(args.Effects != DragDropEffects.None)
5) Identify the element that will be a drop target. A drop target can be UIElement or a ContentElement.
6) On the drop target set the AllowDrop property to true.
7) Attach the drop handler to the target element. Here you can extract the data from the DragEventArgs that you have set in the DragInitialize event and also implement the change in the UI (for example add an item to a ListBox, etc.).
sender, Telerik.Windows.DragDrop.DragEventArgs args)
8) Add a DragDropCompleted handler to the source. This event is raised after the drag and drop operation has succeeded. You can use it to change something in the source object (for example to remove the item from a ListBox that has been dropped in another one):
sender, Telerik.Windows.DragDrop.DragDropCompletedEventArgs args)
9) If you want you may also set add DragEnter, DragOver, DragLeave, etc. events to implement your logic.
To show you how to do this I'm sending an example for DragDrop between ListBox and RadGridView (attachment DragDropManager_SL_UsingEvents.zip).
For your scenario there is a simpler way to implement your logic. The DragDropManager is presenting the Behavior concept - by adding only three rows in your XAML you'll be able to implement full DragDropLogic for the specific controls. The RadGridView is one of the controls that has predefined behavior so you can just add the following lines to your code:
More information for the behaviors and the possible use of a DataConverter can be found in our online help here. You may also check the online examples here as some of them are using behaviors.
For your convenience of the advantages of the behaviors I'm sending you another project (attachment DragDrop_btw_RadGridView.zip) where the DragDrop is implemented between two RadGridView controls - you can check how simple and easy to use is this application.
Hopefully this clears the confusion. Don't hesitate to contact us if you still have any problems or concerns.
the Telerik team