Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

A radio button in two groups?

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.

Ex:
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?
0
CCHSA
Asked:
CCHSA
2 Solutions
 
darkpriestCommented:
From what i understand its not... though ive never tried it, probably because i didnt' think it was possible :D
0
 
Bob LearnedCommented:
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.

Bob
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now