RadioButtonList(HTML) Control in a GridView

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QW5keSBpbiBTb3V0aCBKZXJzZXk=?=

    RadioButtonList(HTML) Control in a GridView

    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"
    AutoGenerateCol umns="False" DataKeyNames="Q uestion_id"
    DataSourceID="S qlDataSource1">
    <Columns>
    <asp:BoundFie ld DataField="q_De scription"
    HeaderText="Que stion" SortExpression= "q_Descript ion" />
    <asp:BoundFie ld DataField="Answ er_id" HeaderText="Ans wer_id"
    SortExpression= "Answer_id" />
    <asp:TemplateFi eld HeaderText="Lev el of Helpfulness">
    <ItemTemplate >
    <asp:RadioButto nList ID="RadioButton List1"
    runat="server" RepeatDirection ="Horizontal " SelectedValue=' <%#
    Bind("Answer_id ") %>'>
    <asp:ListItem Value="1">None</asp:ListItem>
    <asp:ListItem Value="2">Minim al</asp:ListItem>
    <asp:ListItem Value="3">Moder ate</asp:ListItem>
    <asp:ListItem Value="4">Very</asp:ListItem>
    <asp:ListItem Value="4">Highl y</asp:ListItem>
    </asp:RadioButton List>
    </ItemTemplate>
    </asp:TemplateFie ld>
    </Columns>
    </asp:GridView>

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