datagridview drag and drop

msl88

New member
Joined
Feb 7, 2013
Messages
3
Programming Experience
3-5
All,

Question - I am creating a mapping application that needs to drag N rows from a datagridview to an item in a list box. Essentially a user should be able to select any amount of rows from this datagridview, highlight them, and then drag and drop on an item in the list box. In the list box there would be Group A, Group B and Ungrouped. Each time you select a new item in the list box the datagridview rows will change to the rows in the Group selected in the list box.

I have a feeling that it will be a solution using the on mouse down event, on mouse move event, on mouse up event and grabbing the selected datagridview items. The only event I am not sure of is when you do mouse up how do you get what list item you are currently hovering on....

Thanks!
 
That helps. Now when I drag and drop I can get the rows from a datagridview that I selected from the code provided in your link. The next step will be figuring out what list box item I am hovering over and I do the "drop" part of the drag and drop. Time to research! Thanks!
 
Yup, found that on the MSDN website. Thanks, man. Really appreciate it. I believe that is all of the information I need to get this done.
 
Back
Top