After inert a RadioButtonList to a DataGrid

Discussion in 'ASP .Net' started by ad, Apr 17, 2005.

  1. ad

    ad Guest

    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?
     
    ad, Apr 17, 2005
    #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. Bob Hoke
    Replies:
    0
    Views:
    483
    Bob Hoke
    Jul 11, 2003
  2. Mike P

    edit datagrid with radiobuttonlist

    Mike P, Aug 27, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    425
    Mike P
    Aug 27, 2003
  3. Replies:
    1
    Views:
    497
    Ken Cox [Microsoft MVP]
    Oct 5, 2006
  4. BizEd
    Replies:
    1
    Views:
    833
    Aamir Ghanchi
    Oct 2, 2007
  5. TheDrifter
    Replies:
    1
    Views:
    558
    Gaurav Vaish \(a.k.a. MasterGaurav\)
    Jul 23, 2008
Loading...

Share This Page