modify display of RadioButtonList items

Discussion in 'ASP .Net Web Controls' started by Mark, Jun 9, 2005.

  1. Mark

    Mark Guest

    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.
    Mark, Jun 9, 2005
    1. Advertisements

  2. 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
    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!
    (This posting is provided "AS IS", with no warranties, and confers no
    Steven Cheng[MSFT], Jun 9, 2005
    1. Advertisements

  3. Mark

    Mark Guest

    Thank you Steven, I appreciate the feedback. You've given me some good ideas!
    Mark, Jun 9, 2005
  4. You're welcome Denmast,

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


    Steven Cheng
    Microsoft Online Support

    Get Secure!
    (This posting is provided "AS IS", with no warranties, and confers no
    Steven Cheng[MSFT], Jun 10, 2005
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike S
    Mike S
    Jul 15, 2003
  2. rishi pariahr via .NET 247

    validation on items of radiobuttonlist in jsp

    rishi pariahr via .NET 247, Apr 5, 2005, in forum: ASP .Net
  3. Replies:
    Jan 24, 2006
  4. lb
  5. raz

Share This Page