0
Answer

using radio button check box gets checked and unchecked

Ask a question
narasiman rao

narasiman rao

11y
1.3k
1
i tried my code as follows; My code as follows; private void Form1_Load(object sender, EventArgs e) { this.cb_am.TabStop = false; this.cb_pm.TabStop = false; } private void cb_am_CheckedChanged(object sender, EventArgs e) { if (cb_am.Checked) { dataGridView1.Rows[0].Cells[0].Value = true; dataGridView1.Rows[0].Cells[1].Value = true; } if (cb_am.Checked = false) { dataGridView1.Rows[0].Cells[0].Value = false; dataGridView1.Rows[0].Cells[1].Value = false; } } i tried my code, if radio button is checked the check box gets true. that is working fine. when radio button is unchecked the check box gets unchecked. the above unchecked it is not working. if (cb_am.Checked = false) { dataGridView1.Rows[0].Cells[0].Value = false; dataGridView1.Rows[0].Cells[1].Value = false; } whether the above code is correct? what is the mistake i made.please help me. Regards, rao.