title: enable and disable checkbox column in datagridview
body: <p>I have a DataGridView with a checkbox column. Then there is this button which has been disabled at <em>formInitialization</em>. Now, I want to enable it only and only when one of the checkboxes is selected. I have succeeded, partially. This is the code.</p>
  
  <pre><code>private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e) {
              foreach (DataGridViewRow dgvr in dataGridView2.Rows)
              {
                  if (dgvr.Cells[2].Value != null)
                  {
                      if ((bool)(dgvr.Cells[2].Value) == true)
                      {
                          button3.Enabled = true;
                      }
                      else
                      {
                          button3.Enabled = false;
                      }
                  }
              }
  }
  </code></pre>
  
  <p>However, it only works if there are two or more checked checkboxes, because the first time <em>cellClick</em> event is fired, it checks if any of the checkboxes are selected, which they are not. Thus, the button is not enabled. How do I get around this?</p>