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

Dragging Row to a ListView Control

Hello, In an Mdi application, how can i implement Drag&Drop from a GridDataBoundGrid (contains in a mdi child form) to a ListView (contains in the mdi parent form). I use the GDBG as an OLE source and i set the AllowDrop Property of the ListView to true but when the cursor is over the listview i get the nodrop cursor. When i dragging a row from the GDBG to an Excel WorkSheet, it''s work fine. Do i need to use the DragDrop, DragEnter, DragMove events of the ListView ? Is there a sample anywhere for doing an Drag&Drop like this ? How can i use a custom data object as part of the drop data ? Thanks, Mikaël

3 Replies

AD Administrator Syncfusion Team August 25, 2004 06:44 AM UTC

You do have to handle some D&D events in your ListView to get the ListView to accept a Text drop. Here is a little sample that shows how you might try to do this. Inside the ListView DragDrop event, it shows how you can get at the text data from the OLE data object, but it does not do anything with it except write it to the output window. ListViewSort_300.zip


MM Mikaël Morvan August 25, 2004 07:37 AM UTC

Thanks for the quick response Clay.


MM Mikaël Morvan August 25, 2004 07:38 AM UTC

Thanks for the quick response Clay.

Loader.
Live Chat Icon For mobile
Up arrow icon