Read GridView Values

S

Samuel

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
 

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

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,737
Latest member
Georgeengab

Latest Threads

Top