Programmatically uncheck checkboxcolumn in datagridview
问题 How can I programmatically uncheck all rows in a DataGridViewCheckboxColumn in a datagridview? I can get the correct value of the checkbox using (bool)row.Cells[CheckBoxColumn.Index].FormattedValue but that's only a getter. I have tried setting the value of the cell using (bool)row.Cells[CheckBoxColumn.Index].value = false but that doesn't affect the FormattedValue. How can I solve this? 回答1: You do sth. like: (row.Cells[CheckBoxColumn.Index] as DataGridViewCheckBoxCell).value = false; You