Gridview Editing Problem

T

Tina

I have a gridview with a template field with a textbox in the ItemTemplate.
In the RowCommand event when the ChgPerson button is hit I handle the event
at follows:

protected void gvAllUsers_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if ((string)e.CommandName.ToLower() == "chgperson")
{

int myRow = int.Parse(e.CommandArgument.ToString());
TextBox mytb =
(TextBox)gvAllUsers.Rows[myRow].Cells[3].Controls[1];
string mystring = mytb.Text;


}

The problem I'm having is that the old value is still in the textbox
eventhough I changed it in the gridview.

Why?
Thanks,
T
 

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
474,263
Messages
2,571,062
Members
48,769
Latest member
Clifft

Latest Threads

Top