private void dgdSoilTexture_KeyDown ( object sender, KeyEventArgs e ) { if ( e.KeyCode == Keys.Delete ) { dgdSoilTexture.EditMode = DataGridViewEditMode.EditOnF2; if ( MessageBox.Show ( "Are you sure you want to Delete this record?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes ) { dgdSoilTexture.Rows.RemoveAt ( dgdSoilTexture.CurrentRow.Index ); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)