Read GridView Values

Discussion in 'ASP .Net' started by Samuel, Mar 24, 2009.

  1. Samuel

    Samuel Guest

    I added the following column to my GridView:


    <asp:TemplateField HeaderText="Quantity" >
    <HeaderStyle ForeColor="#C147B4"
    /><ItemTemplate >
    <asp:TextBox ID="TextBox1"
    MaxLength="3" text='<%# DataBinder.Eval(Container,"DataItem.Quantity") %>'
    runat="server" Width="32px" EnableViewState="true"></asp:TextBox>
    </ItemTemplate>
    <ItemStyle HorizontalAlign="Right" />
    </asp:TemplateField>


    When user is meant to change the value in the text box when the user does
    and then clicks on some other button on the window and I try to read the
    current values I get the original values and not those entered by the user.

    Here is how I read the data
    Val(CType(DVBasket.Rows.Item(i).Cells(2).FindControl("TextBox1"), _
    TextBox).Text)

    Thnak you in advanced,
    Samuel
     
    Samuel, Mar 24, 2009
    #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. Isaac
    Replies:
    0
    Views:
    2,466
    Isaac
    Jul 10, 2003
  2. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    17,994
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  3. Radu
    Replies:
    0
    Views:
    654
  4. Keith G Hicks
    Replies:
    3
    Views:
    773
    Keith G Hicks
    Feb 18, 2008
  5. shrutisunder
    Replies:
    0
    Views:
    482
    shrutisunder
    Mar 11, 2009
Loading...

Share This Page