Drag Drop Between Listview and DataGridView

sapator

Member
Joined
Oct 4, 2006
Messages
23
Programming Experience
1-3
Hi.
I do a drag and drop operation between a Listview and a Datagridview.
The problem is that i cannot get the Cell coordinates when i drop the data since the
DataGridView_DragDrop event only pronides points(x,y) and i need rectangle coordinates for the datagridview Cell.

 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,605
Location
Norway
Programming Experience
10+
The e.x/e.y coordinates for DragDrop event is screen points, translate them to DGV points with the control.PointToClient method. With this client point you can use the DGV.HitTest method that will provide the info you need to determine cell.

Thread moved to Winforms Grids forum.
 
Top Bottom