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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get Data Object during a Drop event in TreeViewItemAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

109832 Jul 5,2013 07:43 PM UTC Jul 12,2013 05:49 AM UTC WPF 2
loading
Tags: Tools
Todd Lichtas
Asked On July 5, 2013 07:43 PM UTC

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


Todd Lichtas
Replied On July 9, 2013 10:24 PM UTC

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

Karthick Ravichandran [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;