Textbox Text in Datagrid Returning to Original Value

K

Kim

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
 
K

Kim

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

Text='<%# DataBinder.Eval(Container.DataItem, "Qty") %>'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top