I've, for example, a datagridview with 3 rows (only 1 single column).
When I drag-and-drop an item to under the bottom row, the hit-test row index returned was "-1".
When I drag-and-drop an item to above the first row (ie at the row header), the hit-test row index returned was also "-1".
My question is: how to distinguish the two situations. Thanks in advance.
Point clientPoint = _dgv2.PointToClient(new Point(e.X, e.Y));
int dropPosition = _dgv2.HitTest(clientPoint.X, clientPoint.Y).RowIndex;