title: datagridview delete rows in C#?
body: <p>I am trying to delete rows from datagridview, when the user selects any row and clicks on delete button , it should ask the user whether he wants to delete the rows?</p>
  
  <p>I am able to delete the rows but I am not sure my control doesnot come to method below:</p>
  
  <pre><code>private void dataGridView1_UserDeletingRow(object sender,DataGridViewRowCancelEventArgs e)
  {
      DialogResult usersChoice =
      MessageBox.Show("Are you sure you want to delete the selected signs?\r\n" + dataGridView1.SelectedRows.Count + " signs will be deleted!", "Signs", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
  
      // cancel the delete event
      if (usersChoice == DialogResult.Cancel)
          e.Cancel = true;
  }
  </code></pre>
  
  <p>I am not sure what show I write in my code so that when user clicks delete button the control comes to the above logic.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks.</p>