Exemple #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();
        }
        //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); }
        }