RadioButtonList in Nested DataGrid Problem

Discussion in 'ASP .Net' started by Bob Hoke, Jul 11, 2003.

  1. Bob Hoke

    Bob Hoke Guest

    I am trying to do some of the things we used to do in classic ASP that
    required some pretty ugly loops in the .ASP page.

    I have two different DataSets that each have a DataView that I can change
    based on parameters passed in.

    In my .ASPX page I have created a loop (using <% ..%> blocks) that contains
    two different DataGrids. The loop changes parameters for the Dataviews
    according to the loops counter and then displays the two different DataGrids
    for each pass through the loop.

    In the second DataGrid I have a template column that contains a
    RadioButtonList control with it's selectedIndex DataBound to a parameter
    from the DataBase/Dataset/DataView. The problem is that the ID of the
    RadioButtonList gets a unique name generated for each row WITHIN THAT
    DATAGRID, but when further DataGrids are generated they are the same set of
    ID names. This causes the earlier versions of that datagrid to not display
    the SelectedIndex because of the lack of unique ID (I think the last use of
    an ID is the only valid one).

    <asp:RadioButtonList id="NeedUniqueNameHere" runat="server" ... >

    Is there any way to pass in a unique ID for the RadioButtonList from the
    ..ASPX page?

    Do I have to programattically generate DataGrids in the CodeBehing page?

    Thanks in advance,

    Bob Hoke
     
    Bob Hoke, Jul 11, 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. Mike P

    edit datagrid with radiobuttonlist

    Mike P, Aug 27, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    425
    Mike P
    Aug 27, 2003
  2. sajvargs
    Replies:
    0
    Views:
    386
    sajvargs
    Feb 20, 2005
  3. Replies:
    3
    Views:
    474
    Victor Bazarov
    Dec 7, 2007
  4. Andy
    Replies:
    0
    Views:
    234
  5. Andreas Klemt
    Replies:
    0
    Views:
    313
    Andreas Klemt
    Oct 8, 2003
Loading...

Share This Page