title: Check/Uncheck a checkbox on datagridview
body: <p>Can someone help me why it doesn't work?
  I have a <code>checkbox</code> and if I click on it, 
  this should uncheck all the checkbox inside the datagridview which were checked before including the user selected checkbox.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>        private void chkItems_CheckedChanged(object sender, EventArgs e)
          {
              foreach (DataGridViewRow row in datagridview1.Rows)
              {
                  DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)row.Cells[1];
                  if (chk.Selected == true)
                  {
                      chk.Selected = false;
                  }
                  else
                  {
                      chk.Selected = true;
                  }
              }
          }
  </code></pre>
  
  <p>the checkbox should not be selected. it should be checked.</p>
  
  <p>here is the added column</p>
  
  <pre><code>            DataGridViewCheckBoxColumn CheckboxColumn = new DataGridViewCheckBoxColumn();
              CheckBox chk = new CheckBox();
              CheckboxColumn.Width = 20;
              datagridview1.Columns.Add(CheckboxColumn);
  </code></pre>