Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have written some code to drag a node from a treeview control and insert it into a listview control. When I call the dodragdrop I have to pass a text string in the first value. If I try to put in a reference to the treenode the dodragdrop function does not execute. Ideally I'd like to be able to pass a datastructure to the listview dropevent to which I can grab the parts out that I need - but now I'm limited to taking the items out of the treenode that I need building delimited string, passing that then splitting it.. not ideal - any idea as to why this is happening and if there is way to pass something other than a string in the dodragdrop between a treeview control and listview control?

 

I'm simply doing this..

 

Private Sub covgTree_ItemDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles covgTree.ItemDrag

 

 

DoDragDrop(e.item, DragDropEffects.Copy Or DragDropEffects.Move)

 

End Sub

Posted

Never Mind Me think me have its..

 

I think I got it working.. there was a dragenter sub that I did not see that was setting the effect to none if the dataformat was not text!?! .. commented out this and whamo bamo it seems to be working now..

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...