private void AuthGrid_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == Cancel.Index) { AuthGrid.CommitEdit(DataGridViewDataErrorContexts.Commit); } }
private void AuthGrid_MouseClick(object sender, MouseEventArgs e) { var ht = AuthGrid.HitTest(e.X, e.Y); if (ht.Type == DataGridViewHitTestType.None) { AuthGrid.CurrentCell = null; } }