RadioButtonList(HTML) Control in a GridView

Discussion in 'ASP .Net' started by Andy in South Jersey, Jul 7, 2008.

  1. 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.
     
    Andy in South Jersey, Jul 7, 2008
    #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. Matthew Louden
    Replies:
    1
    Views:
    7,112
    Scott M.
    Oct 11, 2003
  2. James
    Replies:
    3
    Views:
    2,760
    James
    Dec 15, 2007
  3. Ben
    Replies:
    1
    Views:
    1,534
  4. Greg Larden

    Using a RadioButtonList Server Control in a Composite Control

    Greg Larden, Jul 25, 2006, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    116
  5. Martin Frank
    Replies:
    3
    Views:
    735
    Martin Frank
    Nov 1, 2006
Loading...

Share This Page