ListView Drag Problem

G

Guest

Dear Group

How am I going wrong with this drag and drop procedure..

private void ResourceList_ItemDrag(object sender, System.Windows.Forms.ItemDragEventArgs e

System.Windows.Forms.ListView ListView = (System.Windows.Forms.ListView)sender
System.Collections.ArrayList ListItemArrayList = new ArrayList()

foreach(System.Windows.Forms.ListViewItem Item in ListView.SelectedItems

ListItemArrayList.Add(Item)


ListView.DoDragDrop(new DataObject("System.Collections.ArrayList", ListItemArrayList), DragDropEffects.Copy);


When I drag an item from the ListView control the event is handled by the code above, however the control is stopping the item from being dragged.

I am assuming the item isn't being dragged as the icon looks like a black circle with a line through it.
Is this normal and do I need to change the icon manually

Best regards

Jim...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top