A radio button in two groups?

Posted on 2006-04-11
Last Modified: 2010-04-23
What I need to do is have a series of items in a list, the user will then rank these items. Ranks are mutually exclusive between items.
My idea was to have a group of radio buttons after each item, the user would then select a rank for each item.

Item 1 Rank: R1  R2  R3  R4  R5
Item 2 Rank: R1  R2  R3  R4  R5
Item 3 Rank: R1  R2  R3  R4  R5
Item 4 Rank: R1  R2  R3  R4  R5
Item 5 Rank: R1  R2  R3  R4  R5

The problem with this is that it would then be possible to give two items the same rank. I can think of several ways to keep the item ranks mutually exclusive, but they all involve postbacks every time the user clicks on a radio button. I'd like to avoid that if possible.

I was thinking that if I could extend the radio button control to allow it to be part of two distinct groups (in the above case the first radio button in the item 1 row would belong to a group of all radio buttons associated with item 1, and another group that consists of all "R1" radio buttons. Another way to look at it would be that each number in the grid above belongs to a group consisting of all numbers on its row, and another consisting of all numbers in its column. Hope that makes sense.). The functionality of the radio button would remain the same,

<asp:radiobuttonmod id="RadioButton1" group1name="group1" group2name="group2" runat="server"></asp:radiobuttonmod>

Is this possible?
Question by:CCHSA
    LVL 4

    Accepted Solution

    From what i understand its not... though ive never tried it, probably because i didnt' think it was possible :D
    LVL 96

    Assisted Solution

    by:Bob Learned
    You can't set up the RadioButton control that way, but you can use Javascript to extend the page, and get the results that you want.


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video discusses moving either the default database or any database to a new volume.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now