Can someone help me why it doesn\'t work? I have a checkbox and if I click on it, this should uncheck all the checkbox inside the datagridview which were check
checkbox
All of the casting causes errors, nothing here I tried worked, so I fiddled around and got this to work.
foreach (DataGridViewRow row in dataGridView1.Rows) { if (row.Cells[0].Value != null && (bool)row.Cells[0].Value) { Console.WriteLine(row.Cells[0].Value); } }