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

Is there any way to access information about where in the RadTreeView an item has been dropped?

1 Answer 39 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Praveen
Top achievements
Rank 1
Praveen asked on 01 Dec 2015, 08:42 AM

I have an existing RadTreeView, and would like to allow users to drop the items at another location within the tree .  All I need to capture is the drop target details. It seems to be available within "DragEventArgs.Data" property but this seems to be inaccessible through code.  It has the type "Telerik.Windows.DragDrop.Behaviors.DragPayload.FullTrustPayload" and I can't access it.

Is there any way to access information about where in the RadTreeView an item has been dropped?

TIA

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 03 Dec 2015, 06:38 PM
Hi Praveen,

I guess you mean the DragEventArgs of the DragDropManager's Drop event. If so, you can get the object that holds the information about the dragged treeview item from the TreeViewDragDropOptions object.
var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
The options' object also contains information about the drop target.

In addition you can take a look at the Drag and Drop help article which describes the drag/drop functionality of RadTreeView. Also, you can take a look at the DragDropPayloadManager article that describes how to extract the DragEventArgs.Data object.

I hope this information is useful.

Regards,
Martin
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
TreeView
Asked by
Praveen
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or