Why HitTest does not work in DragOver in DataGridView
DataGridView:
I use the following code to highlight the selected record when the dragOver event is triggered. I work properly in MouseMove event.
DataGridView.HitTestInfo hit = dgvOperation.HitTest(e.X, e.Y);
if (hit.Type == DataGridViewHitTestType.Cell)
{
MessageBox.Show(dgv.Rows[hit.RowIndex].Index.ToString());
dgvOperation.Rows[hit.RowIndex].Selected = true;
}
When I apply the above code in the DragOver event, I cannot get the RowIndex from the DataGridView,Why?
Or who got other solution to provide the same function?
Thanks

