Results 1 to 12 of 12

Thread: [RESOLVED]textbox in GridView not getting new value

Threaded View

  1. #1

    Thread Starter
    Fanatic Member ZeBula8's Avatar
    Join Date
    Oct 2002
    Posts
    548

    Resolved [RESOLVED]textbox in GridView not getting new value

    using:
    -asp.net 2.0
    -Visual Studio 2005

    I have a gridview and one column has a textbox that can be edited in the gridview at all times. There is no Edit/Update/Delete columns here.

    From my business object (List) I'll bind it to the Grid.
    If I originally bind the value 3 to this textbox it displays correctly. When I change this 3 to another number, 5 for instance... and then use:

    Code:
    dim s as string =DirectCast(row.Cells(2).FindControl("QuantityTextBox"), TextBox).Text
    to get the new value of 5 and place it back into the List object
    the value is still 3 and not 5.
    I've used this method many times before and with no problems.
    I don't know why it isn't working here.
    This is driving me nuts. Any ideas?



    markup piece looks like this:

    Code:
     <asp:TemplateField HeaderText="Quantity">
                    <ItemTemplate >
                        <asp:TextBox ID="QuantityTextBox" runat="server" ></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
    Last edited by ZeBula8; Jul 30th, 2007 at 06:03 PM. Reason: [RESOLVED]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width