Click here to Skip to main content
15,880,364 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have four radio buttons. I need to select only one radio button out of four. At first i selected first radio button. now i need to select the second radio button and the first selected radio button should be unchecked.(i.e..only one radio button should be checked as in Radiobutton list) Can any one help me ?
Posted

Hi,
You have to put all radiobuttons in a groupbox or a panel.
See this answer :
http://stackoverflow.com/questions/2178240/how-do-i-group-windows-form-radio-buttons[^]

Best regards.
 
Share this answer
 
Hi, you have to group your radio buttons...

This link may help you....
http://msdn.microsoft.com/en-us/library/sefz7fxc.aspx[^]
 
Share this answer
 
Comments
mskphani 25-Jun-13 3:18am    
its not working in panel. I dragged four radiobuttons into the panel and i executed it. But all the radio buttons are selected.
mskphani 25-Jun-13 3:21am    
i got it now. I forgot to mention the group name.
Dilan Shaminda 25-Jun-13 3:30am    
nice :-)..happy coding!
give the same name to radio button but different names..
 
Share this answer
 
Comments
VICK 25-Jun-13 3:24am    
Do we have to give the same name or different names?????
mkbisht 25-Jun-13 3:32am    
sorry for the mistake in typing..
same name but different values..
You can use RadioButtonList. or give group name.
 
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