Skip to content

I want to select data from gridview and accordingly get radiobuttons checked or unchecked

sathish kumar

Asked Jul 11, 2012, 10:21 PM EDT1 answer
Share
LinkedInX
i want to select data from gridview and accordingly get radiobuttons checked or unchecked


i have two radio buttons male, female.

 based on gridview row selection radio button should get checked and unchecked.

 If gridview row consists column value male , male radio button should get selected..

 

How to do this...Any help friends.....

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi Satish,

    try the following:


     private void dataGridView1_SelectionChanged(object sender, EventArgs e)
            {          
                if (dataGridView1.CurrentCell.Value == "Male")
                {
                    radioButton1.Checked = true;
                }
                else
                    radioButton1.Checked = false;
            }

    hope this helps..
    Sarika
    0