A
ad
I have a tabe with a filed SexID, it use 1 for Male and 2 for Female.
I want to let user can edit this in a DataGrid with a RadioButtonList.
I add a RadioButtonList in the EditItemTemplate:
----------------------------------------------------------------------------
----------------
<EditItemTemplate>
<asp:RadioButtonList ID="RadioButtonList1" Runat="server">
<asp:ListItem Value="1">Male</asp:ListItem>
<asp:ListItem Value="2">Female</asp:ListItem>
</asp:RadioButtonList>
</EditItemTemplate>
----------------------------------------------------------------------------
----------------
My question is
1. How to set the Selected item to the appropriate vale of SexID of the
edited record?
2. After the user press update button, How to update the value of selected
item into database?
I want to let user can edit this in a DataGrid with a RadioButtonList.
I add a RadioButtonList in the EditItemTemplate:
----------------------------------------------------------------------------
----------------
<EditItemTemplate>
<asp:RadioButtonList ID="RadioButtonList1" Runat="server">
<asp:ListItem Value="1">Male</asp:ListItem>
<asp:ListItem Value="2">Female</asp:ListItem>
</asp:RadioButtonList>
</EditItemTemplate>
----------------------------------------------------------------------------
----------------
My question is
1. How to set the Selected item to the appropriate vale of SexID of the
edited record?
2. After the user press update button, How to update the value of selected
item into database?