private void DataGridViewSigns_UserDeletingRow( object sender, DataGridViewRowCancelEventArgs e ) { // Ask the user if they are sure? DialogResult usersChoice = MessageBox.Show( "Are you sure you want to delete the selected signs?\r\n" + DataGridViewSigns.SelectedRows.Count + " signs will be deleted!", "Signs", MessageBoxButtons.OKCancel, MessageBoxIcon.Question ); // cancel the delete event if ( usersChoice == DialogResult.Cancel ) e.Cancel = true; } }