Datagrids first time use

Discussion in 'ASP .Net Datagrid Control' started by Hai Nguyen, Jan 13, 2004.

  1. Hai Nguyen

    Hai Nguyen Guest

    Question Answer
    1 Q1 A1
    2 Q2 A2
    3 Q3 A3
    4 Q4 A4
    5 Q5 A5
    Submit


    I would like to know I hage a datagrid like above, I generate a datagid like
    the one code giving below. The answer column will let the user to fill in
    the answer which assosiate to the quetion asking. I would like to know after
    filling out the answers from
    1/ How can I update those values back to database, I mean how i can let .net
    know which column I want to get the database from
    2/ I would like to have a validiation check as well

    Thanks



    <asp:datagrid id="grid" runat="server" Width="608px"
    OnItemCreated="ItemCreated" AutoGenerateColumns="False"
    " ShowFooter="True">
    <SelectedItemStyle Font-Bold="True" ForeColor="White"
    BackColor="#9471DE"></SelectedItemStyle>
    <ItemStyle ForeColor="Black" BackColor="#DEDFDE"></ItemStyle>
    <HeaderStyle Font-Bold="True" ForeColor="#E7E7FF"
    BackColor="#4A3C8C"></HeaderStyle>
    <FooterStyle ForeColor="Black" BackColor="#C6C3C6"></FooterStyle>
    <PagerStyle HorizontalAlign="Right" ForeColor="Black"
    BackColor="#C6C3C6"></PagerStyle>
    <Columns>
    <asp:BoundColumn DataField="Q_Question"
    HeaderText="Questions"></asp:BoundColumn>
    <asp:TemplateColumn HeaderText="Answer">
    <ItemTemplate>
    <asp:TextBox Runat="server" ID="answerbox"></asp:TextBox>
    </ItemTemplate>
    </asp:TemplateColumn>
    </Columns>
    </asp:datagrid>
    Hai Nguyen, Jan 13, 2004
    #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. Kathy Burke
    Replies:
    0
    Views:
    308
    Kathy Burke
    Aug 26, 2003
  2. coleenholley

    Formatting datagrids at run time

    coleenholley, Jan 29, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    493
    coleenholley
    Jan 30, 2004
  3. =?Utf-8?B?Y2hhcmxpZXdlc3Q=?=

    What to use instead of the CommandArgument in DataGrids?

    =?Utf-8?B?Y2hhcmxpZXdlc3Q=?=, Mar 31, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,351
    Brock Allen
    Mar 31, 2005
  4. flamesrock
    Replies:
    8
    Views:
    435
    Hendrik van Rooyen
    Nov 24, 2006
  5. Brian Takita
    Replies:
    2
    Views:
    122
    Brian Takita
    Jul 25, 2005
Loading...

Share This Page