Using HTMLInputRadioButton Control in a Datagrid

Discussion in 'ASP .Net Web Controls' started by Elliot Rodriguez, Nov 30, 2004.

  1. Thanks for reading my post.

    I have a requirement for the UI I am developing that necessitates I use
    a radio button within each row of a DataGrid (dont ask, I was instructed
    to do it this way). The radio button's value needs to be assigned a
    value from a column in the grid's datasource.

    I am having difficulty applying the value to the radio button.

    It seems that if I leave the control as a plain HTMLInputRadioButton, I
    cannot access the "value" attribute to assign my desired value - I get
    an "Object reference not set to an object" error.

    If I turn it into a server control, I can assign something to the value
    attribute, but the radio button is assigned its own unique name (like
    this: nameofthegrid_controlordinalnumber_thenameIwant), overwriting my
    settings (specified both in the VS designer as well as in code). Since
    the names are unique, the form now permits the user to select multiple
    radio buttons.

    My desired result - the user should only be allowed to select 1 radio
    button out of the rows.

    Any thoughts on how I can accomplish this?
    Elliot Rodriguez, Nov 30, 2004
    #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. Replies:
    0
    Views:
    717
  2. Roshawn

    HTMLInputRadioButton Question

    Roshawn, Aug 9, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    471
    bruce barker
    Aug 9, 2004
  3. =?Utf-8?B?U291cmF2IER1dHRhIEd1cHRh?=

    HtmlInputRadioButton Inside a Datalist

    =?Utf-8?B?U291cmF2IER1dHRhIEd1cHRh?=, Dec 26, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,167
    Christopher Reed
    Dec 26, 2005
  4. Replies:
    1
    Views:
    370
    Teemu Keiski
    Jul 2, 2003
  5. smita

    Accessing htmlinputradiobutton value in server code

    smita, Apr 28, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    142
    smita
    Apr 28, 2004
Loading...

Share This Page