Exemplo n.º 1
0
        private void SetRadioButtonValue(DataGridViewDisableCheckBoxCell cell)
        {
            SelectedStatus status = (SelectedStatus)cell.Value;

            if (status == SelectedStatus.Selected)
            {
                status = SelectedStatus.NoSelected;
            }
            else
            {
                status = SelectedStatus.Selected;
            }
            if (this.tabControlHealthDocManage.SelectedIndex == 0)
            {
                for (int i = 0; i < dataGridView1.Rows.Count; i++)
                {
                    DataGridViewDisableCheckBoxCell cel = dataGridView1.Rows[i].Cells["ColCheck"] as DataGridViewDisableCheckBoxCell;
                    if (!cel.Equals(cell))
                    {
                        cel.Value = status;
                    }
                }
            }
            if (this.tabControlHealthDocManage.SelectedIndex == 1)
            {
                for (int i = 0; i < dataGridView2.Rows.Count; i++)
                {
                    DataGridViewDisableCheckBoxCell cel = dataGridView2.Rows[i].Cells["columnCheck"] as DataGridViewDisableCheckBoxCell;
                    if (!cel.Equals(cell))
                    {
                        cel.Value = status;
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void SetRadioButtonValue(DataGridViewDisableCheckBoxCell cell)
        {
            SelectedStatus status = (SelectedStatus)cell.Value;

            if (status == SelectedStatus.Selected)
            {
                status = SelectedStatus.NoSelected;
            }
            else
            {
                status = SelectedStatus.Selected;
            }
            for (int i = 0; i < storageDataGridView.Rows.Count; i++)
            {
                DataGridViewDisableCheckBoxCell cel = storageDataGridView.Rows[i].Cells["checkBoxColumn"] as DataGridViewDisableCheckBoxCell;
                if (!cel.Equals(cell))
                {
                    cel.Value = status;
                }
            }
        }