Ask a Question related to ASP.NET General, Design and Development.
-
Christian H #1
custom layout : RadioButtonList
Hi!
I'm wondering how I can add extra html to a radiobuttonList, so that I can
control how:
-the whole radioButtonList is rendered.
-each of the radiobutton elements are rendered.
What I am basically trying to do is to combine x radioButtonlists, so that
the output will look like this:
----------------------------------------------------------------------------
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>True</td>
<td>False</td>
<td>Don't know</td>
<td></td>
</tr>
<tr>
<td><input id="question_4_0_0" type="radio" value="9"
name="question_4_0"></td>
<td><input id="question_4_0_1" type="radio" value="10"
name="question_4_0"></td>
<td><input id="question_4_0_2" type="radio" value="-"
name="question_4_0"></td>
<td> Answer 1</td>
</tr>
<tr>
<td><input id="question_4_1_0" type="radio" value="1"
name="question_4_1"></td>
<td><input id="question_4_1_1" type="radio" value="2"
name="question_4_1"></td>
<td><input id="question_4_1_2" type="radio" value="-"
name="question_4_1"></td>
<td> Answer 2</td>
</tr>
<tr>
<td><input id="question_4_2_0" type="radio" value="1"
name="question_4_2"></td>
<td><input id="question_4_2_1" type="radio" value="2"
name="question_4_2"></td>
<td><input id="question_4_2_2" type="radio" value="-"
name="question_4_2"></td>
<td> Answer 3</td>
</tr>
</table>
----------------------------------------------------------------------------
The radiobuttonlists are dynamically created, using data from a database.
My idea was to add the <table> start and end tags manually as I am looping
through the database.
What I need though, is a way to :
-add <tr> start and end tags for each radioButtonlist
-add <td> start and end tags for each radioButton within each
radioButtonlist.
I imagine that there is a method I can override, that deals with the
creation of the radiobuttonlist, and that there also is a method I can
override, that creates the child elements (each radiobutton) within the
radiobuttonlist.
If anyone knows what methods I need to override, and how I do this, I would
really appreciate it.
Christian H Guest
-
Adding layout elements within custom control
Hi all, I have a custom control that I use within forms that contains form inputs and validator controls. At the moment I'm overriding the Render... -
Custom RadioButtonList and modifying HTML?
The HTML generated by the RadioButtonList contains a table structure as: <table id="rbList1" border="0"> <tr>... -
RadioButtonList
Maybe you can help me with the following logic I am trying to accomplish. My RadioButtonList is in datagrid <EditItemTemplate> column If my... -
Custom RadioButtonList with Attribute support for ListItem
I found the listitem class was sealed, and can't get tooltips for radio button in a radionbuttonlist, apparently this is by design.. ... -
Radiobuttonlist and cssclass
I am in the process of updating old asp projects into asp.net. We used to have radiobuttons which had an attached css class as follows: <label... -
Natty Gur #2
Re: custom layout : RadioButtonList
Hi,
The easy way is to use the DataList Control (template with label and
radioButtonList). You can also create your own RadioButtonList control
that derived from RadioButtonList and override the Render method.
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest



Reply With Quote

