custom layout : RadioButtonList

Discussion in 'ASP .Net Web Controls' started by M Aamir Maniar, Jul 30, 2003.

  1. Well you can create your own custom web control to achive
    this

    regards
    m aamir maniar

    >-----Original Message-----
    >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.
    >
    >
    >
    >.
    >
    M Aamir Maniar, Jul 30, 2003
    #1
    1. Advertising

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. Christian H

    custom layout : RadioButtonList

    Christian H, Jul 30, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,956
    Natty Gur
    Jul 30, 2003
  2. Rick Spiewak
    Replies:
    3
    Views:
    3,134
    Rick Spiewak
    Aug 26, 2003
  3. =?Utf-8?B?T2xlZw==?=

    RadioButtonList layout problem

    =?Utf-8?B?T2xlZw==?=, Aug 17, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,206
    Curt_C [MVP]
    Aug 18, 2005
  4. Replies:
    1
    Views:
    564
    John Timney \(MVP\)
    Jun 19, 2006
  5. Oleg

    RadioButtonList layout problem

    Oleg, Aug 17, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    96
Loading...

Share This Page