Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > modify display of RadioButtonList items

Reply
Thread Tools

modify display of RadioButtonList items

 
 
Mark
Guest
Posts: n/a
 
      06-09-2005
Hi,
I currently use a radiobuttonlist to display a selection of choices a user
needs to make. However, the requirement has changed somewhat in that now I
need to create the following situation: with some of the items displayed, if
user selects it, other 'deeper' items display (more option list items,
intitially set to invisible), but with these 'new' items indented to indicate
that they sit 'under' the initially selected item. For example, if the
original list contained fruit such as Apples, Pears, Grapes, and the user
selects Apples, then underneath that selection (and before the Pears
selection) two new selections appear -- Macintosh and Granny Smith -- and
indented slightly from the original list items.

Is this kind of scenario even possible with the radiobuttonlist control, and
if so, could someone point me in the right direction as to how to accomplish
this. TIA.
 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      06-09-2005
Hi Denmast,

Welcome to ASPNET newsgroup.
As for the problem you mentioned, here are some of my suggestions:

1. Since the RadioButtonList control is well encapsulated and doesn't
provide any buildin means for injecting and customzation, I don't think
it's appropriate to use radioButtionList for your scenario(inject some sub
level check items between each top level items).
If you do need such structure output, I suggest you considering creating a
custom control which will output the RadioButtion collection depending on
the datasource and each RadioButton is put in a TableCell together with
another
Container control within it. The container control( maybe a panel or place
holder ) will contains those such level check items of each toplevel radio
buttion. And in the RadioButton's click event, we can show the subitems.

2. Also, do you think it possible that we don't inject the sub level items
between the top level radio buttions? We can separate the top level radio
buttions and the sub level items. Forexample, we use a radioButtonList to
display the toplevel options and then, when a certain item is selected , we
display the subitems dynamically in another table or panel and when it's
unselected, we hidden those sub items and display the new subitems
according to the new selected one.

How do you think of this? If there're anything unclear or any other ideas,
please feel free to post here. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



 
Reply With Quote
 
 
 
 
Mark
Guest
Posts: n/a
 
      06-09-2005
Thank you Steven, I appreciate the feedback. You've given me some good ideas!
 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      06-10-2005
You're welcome Denmast,

If anything else we can help later, please also feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Attributes to items in a RadioButtonList raz ASP .Net 0 08-24-2006 05:38 PM
Radiobuttonlist, add new items problem lb ASP .Net 1 06-14-2006 12:27 AM
ClientID of Items in RadioButtonList? haroldsphsu@gmail.com ASP .Net 1 01-24-2006 03:06 AM
validation on items of radiobuttonlist in jsp rishi pariahr via .NET 247 ASP .Net 2 04-05-2005 12:34 PM
Adding Attributes to RadioButtonList Items? Mike S ASP .Net 1 07-15-2003 05:36 AM



Advertisments