B
Bob Hoke
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
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