After inert a RadioButtonList to a DataGrid

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?
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top