コード例 #1
0
        //headerchckbox click event
        private void Headerchckboxclick(CheckBox Hcheckbox)
        {
            foreach (DataGridViewRow row in ScheduledExam_dgv.Rows)
            {
                ((DataGridViewCheckBoxCell)row.Cells["checkBoxColumn"]).Value = Hcheckbox.Checked;
            }

            ScheduledExam_dgv.RefreshEdit();
        }
コード例 #2
0
        //headerchckbox click event
        private void Headerchckboxclick(CheckBox Hcheckbox)
        {
            try
            {
                foreach (DataGridViewRow row in ScheduledExam_dgv.Rows)
                {
                    ((DataGridViewCheckBoxCell)row.Cells["checkBoxColumn"]).Value = Hcheckbox.Checked;
                }

                ScheduledExam_dgv.RefreshEdit();
            }
            catch (Exception) { MessageBox.Show("Try Again", "Headercheckboxclick", MessageBoxButtons.OK, MessageBoxIcon.Error); }
        }