Click here to Skip to main content
12,820,857 members (27,889 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
I have one clear Button,using clear button how to uncheck the radio button.

Clear button

Radio button.

when i click the clear button, i want to uncheck the radio button.

how can i do using csharp.

i tried but it is not working.

My code as follows;

SessAM.Checked = false;

from my above code what is the problem.

the code is not working.
note it is windows application.
Posted 11-Mar-13 0:40am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

A radio button option group is provided so that a user chooses at least one option.
So have a default that is selected when the user clears the screen.

You should not ideally be providing an option to clear out all option buttons.
If you want this functionality, use checkboxes instead.
onurag19 11-Mar-13 5:53am
+5. Nice Advice You can't use radio button.
Abhinav S 11-Mar-13 5:55am
Marcus Kramer 11-Mar-13 10:12am
Abhinav S 11-Mar-13 10:25am
Thank you.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

hello professional

ya if there is group of radio button then its good to contain them in Group box or panel container control that will automatically select only one radio button at a time that no need to checked=false or true on any click event
so put them on a container control.

Happy to help
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

If you need to get only a option from a list use radioButtons if you need multi-options form your list use checkBoxes. CheckBoxes can be all unchecked. RadioButtons can have only one active one and that active one can't be unchecked. Try to drag your radioButtons to an GroupBox and then you will create groups of radioButtons that will work individual from the rest. Then you can disable your radioButtons like this when you click your ClearButton:

groupBox1.Enabled = false;


You can also try if it helps you:

SessAM.Enabled = false;

Good Luck!

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100