RadioButtonList(HTML) Control in a GridView

  • Thread starter Andy in South Jersey
  • Start date


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

<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False" DataKeyNames="Question_id"
<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">
<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>

Now I want to be able to insert rows in a table and get the value selected
in the RadioButtonList.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question