We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to get Data Object during a Drop event in TreeViewItemAdv

I'm trying to get the TreeViewItemAdv object that is being dropped onto another TreeViewItemAdv object within the same TreeViewAdv control, but the DataObject is not being returned by the call to GetData.  tvItemBeingDragged is set to "Nothing" after the call to e.Data.GetData.  Here is a code sample of what I'm trying to do
 

        Private Sub TreeViewItemAdv_Drop(sender As Object, e As Windows.DragEventArgs)

    'Get the item that is receiving the dropped item

            Dim tvTargetItem As TreeViewItemAdv = e.Source

 

    'Get the item that is being dropped onto tvTargetItem

            Dim tvItemBeingDragged As TreeViewItem = e.Data.GetData(GetType(TreeViewItem))

    'Do some stuff here with the items

 

End Sub

Is there another way to get the TreeViewItem being dragged?

Thanks,

Todd


2 Replies

TL Todd Lichtas July 9, 2013 10:24 PM UTC

Is there anyone that can answer this?  I need to get the item being dragged.


KR Karthick Ravichandran Syncfusion Team July 12, 2013 05:49 AM UTC

Hi Todd,

 

Thanks for using Syncfusion products.

 

You can achieve your requirement by using the e.DraggingItems and e.TargetDropItem in DragEnd event. We have prepared a sample based on this and you can find the sample under the following location.

  

Please let us know if this helps.

 

Regards,

Karthik



VBSample_168b8949.zip

Loader.
Live Chat Icon For mobile
Up arrow icon