Textbox Problem in DataGrid1_UpdateCommand

T

Tom Grinnert

Hello !

Im using a simple Datagrid in a C# VS 2002 Webapplication. If I change the
String in "Item.Cells[1].Controls[0] " the following code outputs after
click on update:

DataGrid being UPDATED - DataGrid1 : Item - 0 > OldString


But the String I write to Grid was "NewString". Why did not show t.Text the
value of the new String ?


private void DataGrid1_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{


DataGrid dgTemp = ((DataGrid)source);

TextBox t = (TextBox)(e.Item.Cells[1].Controls[0]);

Debug.WriteLine("DataGrid being UPDATED - " + dgTemp.ID.ToString() + " :
Item - " + e.Item.ItemIndex.ToString() + " > " + t.Text);

}


Regards

Tom
 

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,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top