title: Get value from DataGridViewCheckBoxCell
body: <p>I am working on a <code>DataGridView</code> called <code>ListingGrid</code> trying to activate / deactivate users that have been "checked" on any <code>DataGridViewCheckBoxCell</code> that is inside the <code>DataGridViewCheckBoxColumn</code>.</p>
  
  <p>This is the way im trying to do that :</p>
  
  <pre><code>foreach (DataGridViewRow roow in ListingGrid.Rows)
  {
      if ((bool)roow.Cells[0].Value == true)
      {
          if (ListingGrid[3, roow.Index].Value.ToString() == "True")
          {
              aStudent = new Student();
              aStudent.UserName = ListingGrid.Rows[roow.Index].Cells[2].Value.ToString();
              aStudent.State = true;
              studentList.Add(aStudent);
  
          }
      }
  }
  </code></pre>
  
  <p>As far as I get, when you check a <code>DataGridViewCheckBoxCell</code>, the value of the cell is <code>true</code> right? But it is not allowing me to convert the value to bool and then compare it, throwing me an invalid cast exception.</p>