A
Andy in South Jersey
I want to use a RadioButtonList Control(HTML) in a GridView control.
I can see the RadioButtonList control with each row in the GridView with the
code:
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False" DataKeyNames="Question_id"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="q_Description"
HeaderText="Question" SortExpression="q_Description" />
<asp:BoundField DataField="Answer_id" HeaderText="Answer_id"
SortExpression="Answer_id" />
<asp:TemplateField HeaderText="Level of Helpfulness">
<ItemTemplate>
<asp:RadioButtonList ID="RadioButtonList1"
runat="server" RepeatDirection="Horizontal" SelectedValue='<%#
Bind("Answer_id") %>'>
<asp:ListItem Value="1">None</asp:ListItem>
<asp:ListItem Value="2">Minimal</asp:ListItem>
<asp:ListItem Value="3">Moderate</asp:ListItem>
<asp:ListItem Value="4">Very</asp:ListItem>
<asp:ListItem Value="4">Highly</asp:ListItem>
</asp:RadioButtonList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Now I want to be able to insert rows in a table and get the value selected
in the RadioButtonList.
I can see the RadioButtonList control with each row in the GridView with the
code:
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False" DataKeyNames="Question_id"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="q_Description"
HeaderText="Question" SortExpression="q_Description" />
<asp:BoundField DataField="Answer_id" HeaderText="Answer_id"
SortExpression="Answer_id" />
<asp:TemplateField HeaderText="Level of Helpfulness">
<ItemTemplate>
<asp:RadioButtonList ID="RadioButtonList1"
runat="server" RepeatDirection="Horizontal" SelectedValue='<%#
Bind("Answer_id") %>'>
<asp:ListItem Value="1">None</asp:ListItem>
<asp:ListItem Value="2">Minimal</asp:ListItem>
<asp:ListItem Value="3">Moderate</asp:ListItem>
<asp:ListItem Value="4">Very</asp:ListItem>
<asp:ListItem Value="4">Highly</asp:ListItem>
</asp:RadioButtonList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Now I want to be able to insert rows in a table and get the value selected
in the RadioButtonList.