Код: Выделить всё
private void dgvListItems_DragOver(object sender, DragEventArgs e)
{
Point clientPoint = dgvListItems.PointToClient(new Point(e.X, e.Y));
e.Effect = DragDropEffects.Copy;
foreach (DataGridViewRow r in dgvListItems.Rows)
{
r.DefaultCellStyle.BackColor = Color.White;
}
var hittest = dgvListItems.HitTest(clientPoint.X, clientPoint.Y);
if (hittest.ColumnIndex != -1
&& hittest.RowIndex != -1)
{
if (hittest.ColumnIndex == dgvListItems.Columns["MassIn"].Index)
{
dgvListItems.Rows[hittest.RowIndex].Cells[hittest.ColumnIndex].Style.BackColor = Color.Pink;
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... ng-over-it