private void CheckBoxHeader_OnCheckBoxClicked(object sender, CheckBoxHeaderCellEventArgs e) { BranchesGrid.CommitEdit(DataGridViewDataErrorContexts.Commit); for (int i = 0; i < BranchesGrid.Rows.Count; i++) { DataGridViewRow row = BranchesGrid.Rows[i]; DataGridViewCheckBoxCell cell = (DataGridViewCheckBoxCell)row.Cells[nameof(_NO_TRANSLATE_deleteDataGridViewCheckBoxColumn)]; cell.Value = e.Checked; } BranchesGrid.EndEdit(); }
protected virtual void OnCheckBoxClicked(CheckBoxHeaderCellEventArgs e) { CheckBoxClicked?.Invoke(this, e); }