This is a migrated thread and some comments may be shown as answers.

Only Check One Checkbox

5 Answers 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
AL
Top achievements
Rank 1
AL asked on 07 Nov 2008, 07:12 PM
Hi,

Is there a way to make two or more checkboxes act like radio buttons. The beauty of checkboxes is that you can check and uncheck them, but not with radio buttons.

Thanks! Also, I am creating a survey website with all sorts of controls in it (checkboxes, radiobuttons, textboxes...),  can anyone suggest any radcontrols that should be an underlying container for these controls.

Have a great day!

5 Answers, 1 is accepted

Sort by
0
Shaun Peet
Top achievements
Rank 2
answered on 07 Nov 2008, 09:14 PM
Hi Al,

You can accomplish what you're after either by using server-side code (and ajax) or via javascript on the client.  This is not a telerik-specific issue though, and I'd recommend searching google for "javascript select checkbox".  If you'd like additional help on these forums, you'll need to be a little more specific by providing a snippet of your code and I'm sure somebody (or myself) would be able to help you out.  Still, I'd recommend to have a look on google for information about how to manipulate html form elements using javascript.  Hope that helps,

Shaun.
0
Accepted
Shaun Peet
Top achievements
Rank 2
answered on 07 Nov 2008, 09:17 PM
To answer the second part of your question, which you must have added as I was tying my last answer, I'd recommend using standard asp.net checkboxes / radiobuttons / textboxes, and placing a RadFormDecorator on the page.  You should also use a RadInputManager for helping with the data entry (validation) for the textboxes.
0
Accepted
Shaun Peet
Top achievements
Rank 2
answered on 07 Nov 2008, 09:20 PM
And, finally, one last suggestion is that you remember to keep usability standards in mind when designing your forms.  Users are trained to understand that a list of checkboxes usually means multiple-selection and a list of radiobuttons usually means single-selection.  Changing the default behaviour of standard form elements is usually not recommended, but it's completely up to you.
0
AL
Top achievements
Rank 1
answered on 07 Nov 2008, 09:25 PM
Shaun,

I appreciate your quick response and detailed suggestions and recommendations!

Thank you for pointing me to the right direction.

AL.
0
Shaun Peet
Top achievements
Rank 2
answered on 07 Nov 2008, 09:32 PM
No problem.  Don't forget to mark a post as answered if you've found the information you're looking for.  Thanks!
Tags
General Discussions
Asked by
AL
Top achievements
Rank 1
Answers by
Shaun Peet
Top achievements
Rank 2
AL
Top achievements
Rank 1
Share this question
or