title: Datagridview checkbox checked when clicking the cell
body: <p>I handle my checkbox click event with the <em>CurrentCellDirtyStateChanged</em>. What I want to be able to do is handle the same event when I click the <strong>cell</strong> that contains the checkbox too, i.e. when I click the cell, check the checkbox and call the DirtyStateChanged. Using the following code does not help much, it does not even call the <em>CurrentCellDirtyStateChanged</em>. I've run out of ideas.</p>
  
  <pre><code>private void dataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
  {
      if(dataGridView.Columns[e.ColumnIndex].ReadOnly != true)
      {       
            //option 1
            (dataGridView.CurrentRow.Cells[e.ColumnIndex] as DataGridViewCheckBoxCell).Value = true;
            //option 2
            DataGridViewCheckBoxCell cbc = (dataGridView.CurrentRow.Cells[e.ColumnIndex] as DataGridViewCheckBoxCell);
            cbc.Value = true;
            //option 3
            dataGridView.CurrentCell.Value = true;
      }
  
  }
  </code></pre>