private void chkSelect_CheckedChanged(object sender, EventArgs e) { try { if (this.dgvArchivesData.Rows.Count > 0) { for (int i = 0; i < this.dgvArchivesData.Rows.Count; i++) { if ((bool)this.dgvArchivesData.Rows[i].Cells[0].EditedFormattedValue) { this.dgvArchivesData.Rows[i].Cells[0].Value = false; } else { this.dgvArchivesData.Rows[i].Cells[0].Value = true; } } } } catch(Exception ex) { } }