Only Check One Checkbox

6 posts, 2 answers
  1. AL
    AL avatar
    40 posts
    Member since:
    May 2008

    Posted 07 Nov 2008 Link to this post

    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!
  2. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 07 Nov 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 07 Nov 2008 Link to this post

    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.
  5. Answer
    Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 07 Nov 2008 Link to this post

    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.
  6. AL
    AL avatar
    40 posts
    Member since:
    May 2008

    Posted 07 Nov 2008 Link to this post

    Shaun,

    I appreciate your quick response and detailed suggestions and recommendations!

    Thank you for pointing me to the right direction.

    AL.
  7. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 07 Nov 2008 Link to this post

    No problem.  Don't forget to mark a post as answered if you've found the information you're looking for.  Thanks!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017