Click here to Skip to main content
16,018,318 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi I am using Grid View with Item Template of Radio Buttons. when i click the particular radio button it's need to be checked, and need to set the checked property as true. in C# Code i want to check whether Radio Button ID checked property is true. if it is true, i want to get the particular cell value in text box


How is Possible?
Posted
Updated 8-Oct-13 21:52pm
v2
Comments
Thanks7872 9-Oct-13 3:00am    
Not a good question.

when i click the particular radio button it's need to be checked. Radio button is not some thing that can be checked.

if i click other radio button means they previous checked need to be disable What do you mean by this?

What have you implemented so far?[Dont post gridview code,i am asking about the code you implemented to perform this task]
Tom Marvolo Riddle 9-Oct-13 3:36am    
First try to understand radiobutton.If you use multiple radiobutton use a group name or else go with Radiobuttonlist.

Radiobutton doesn't allow you to select more than one option if it is grouped

write this code in ok Button
for (int m = 0; m < Gridname.Rows.Count; m++)
{ //radio button cell no here
RadioButton box = (RadioButton)Gridname.Rows[m].Cells[4].FindControl("radiobutonid1");
if (box.Checked == true)
{
Text1.Text=Gridname.Rows[m].Cells[8].Text;
}
}
write your cell no which value u want to display on textBox
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900