Textbox Text in Datagrid Returning to Original Value

Discussion in 'ASP .Net Datagrid Control' started by Kim, Jul 7, 2003.

  1. Kim

    Kim Guest

    Hi All,

    I have a datagrid with 4 columns bound and one 'Quantity' textbox
    column. Is there some way to bind the text in the textbox column to a
    property of the "items" in my datagrid (I have a separate item class
    that represents one item)? I have tried setting the text of the
    textbox control after a new 'Quantity' is entered but each time the
    page is loaded, the text resets to the original value...

    I saw a similar posting on this question but the textbox text was
    bound to the results of a stored procedure not a property in a class.

    Thank you in advance for any help :)
    ~Kim
    Kim, Jul 7, 2003
    #1
    1. Advertising

  2. Kim

    Kim Guest

    I have found the answer to my own question. I Added this code to bind the textbox:

    Text='<%# DataBinder.Eval(Container.DataItem, "Qty") %>'
    Kim, Jul 8, 2003
    #2
    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. John
    Replies:
    2
    Views:
    1,533
    Darren Kopp
    Oct 9, 2005
  2. Phoenix
    Replies:
    3
    Views:
    1,302
    Joris Gillis
    Dec 30, 2004
  3. Replies:
    8
    Views:
    315
    Roy Gourgi
    Jun 28, 2005
  4. ErwinP
    Replies:
    1
    Views:
    727
    ErwinP
    Aug 19, 2005
  5. Chuck
    Replies:
    0
    Views:
    242
    Chuck
    Jul 5, 2003
Loading...

Share This Page