private void checkboxHeader_CheckedChanged(object sender, EventArgs e) { for (int i = 0; i < dataGridView1.RowCount; i++) { dataGridView1[0, i].Value = ((CheckBox)dataGridView1.Controls.Find("checkboxHeader", true)[0]).Checked; } for (int j = 0; j <= dataGridView1.RowCount - 1; j++) { dataGridView1[j, 0].Value = ((CheckBox)sender).Checked; } dataGridView1.EndEdit(); }
DataGridViewCheckBoxCell cell = (DataGridViewCheckBoxCell(dataGridView1.Rows[j].Cells[0]); cell.Value = cell.TrueValue;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)