When you set the DataPropertyName property of the DataGridViewCheckBoxColumn to 'id', it automatically binds the checkbox column to the property in the data source. It seems that the values in the "id" property is shown as boolean values, where a non-empty string is considered 'true' and an empty string is considered 'false'.
To set all your checkboxes to 'false' initially without affecting the 'id' value, you can store the original 'DataPropertyName' value in a temporary variable before setting it to null. This disables the data binding temporarily. Then, after inserting the column into the dataGridView1, loop through each row and set the value of the checkbox cell to false/'0'.
You can then restore the 'DataPropertyName' back to its original value, which allows you to get the correct 'id' values' -
DataGridViewCheckBoxColumn CBColumn = new DataGridViewCheckBoxColumn();
CBColumn.Width = 30;
CBColumn.FalseValue = "0";
CBColumn.TrueValue = "1";
CBColumn.ReadOnly = false;
string dataPropertyName = CBColumn.DataPropertyName;
CBColumn.DataPropertyName = null;
dataGridView1.Columns.Insert(0, CBColumn);
foreach (DataGridViewRow row in dataGridView1.Rows)
{
DataGridViewCheckBoxCell checkBoxCell = (DataGridViewCheckBoxCell)row.Cells[0];
checkBoxCell.Value = CBColumn.FalseValue;
}
CBColumn.DataPropertyName = dataPropertyName;