private void myDataGrid1_CellEnter(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == 0 && (e.ColumnIndex == 1 || e.ColumnIndex==2 )) { myDataGrid1.ClearSelection(); DataGridViewCell MyCell = myDataGrid1.Rows[myDataGrid1.CurrentCell.RowIndex].Cells[3]; myDataGrid1.CurrentCell = MyCell; myDataGrid1.Rows[myDataGrid1.CurrentCell.RowIndex].Cells[3].Selected = true; } }
SelectionMode
System.Windows.Forms.DataGridViewSelectionMode.CellSelect
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)