title: how reference unbound combo box in a DataGridView
body: <p>I'm using the CellClick event and would like to update another checkbox on the grid.
  Example:-Two columns with Add and a Delete column.
  User clicks Add and the system checks that the delete checkbox is not also checked.
  if Delete is checked
  ------ set Delete to false</p>
  
  <p>In other words the check boxes Add and Delete for the same row must not both be checked.</p>
  
  <p>I'm using...</p>
  
  <pre><code>private void customersDataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
  </code></pre>
  
  <ol>
  <li>how do I get the value of the current cell by name "Add".</li>
  <li>how do I get the value of the other cell by name "Delete".
  The above process is a flip/flop.</li>
  </ol>
  
  <p>If I new how to access the cell as an object I should be able to do the rest.</p>
  
  <p>I keep finding example that use <code>cmbBox = e.Control as ComboBox</code> but that does not work :(</p>
  
  <p>Links to examples would help thanks.</p>
  
  <hr>
  
  <p><em>Added from your suggested edit to the answer -Andomar</em></p>
  
  <p>This works... </p>
  
  <pre><code>private void customersDataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
  {
      if (e.ColumnIndex &gt;= 0 &amp;&amp; e.RowIndex &gt;= 0)
      {   
          //Set a var that determined whether or not the checkbox is selected       
          bool selected = (bool)this.customersDataGridView[e.ColumnIndex, e.RowIndex].Selected;
          //Do the flip-flop here  
          const int add = 4;
          const int delete = 5;
          switch (e.ColumnIndex)
          {
              //If the checkbox in the Add column changed,
              //  flip the value of the corresponding Delete column           
              case add:
                  this.customersDataGridView[delete, e.RowIndex].Value = !selected;
                  break;
              //If the checkbox in the Delete column changed, 
              //  flop the value of the corresponding Add column       
              case delete:
                  this.customersDataGridView[add, e.RowIndex].Value = !selected;
                  break;
          }
      }
  }
  </code></pre>
  
  <p>no need for dataGridView1_CellMouseUp</p>