|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
modify display of RadioButtonList itemsHi,
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. 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.) Thank you Steven, I appreciate the feedback. You've given me some good ideas!
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.)
Table height 100% has no effect
Problem using AddHandler for dynamically created WebControls Dynamic Web Control Event Handling Question about IE Web Controls Toolbar. Displaying label at runtime Need a list of radiobuttons with a specfic format Using html controls or asp controls asp.net 1.1 wizard control Alignment of a System.Web.UI.WebControls.Image object Parent of WebControl |
|||||||||||||||||||||||