Help,
I have a DataGrid with the Edit, Update and Cancel Columns selected to
provide edit by TextBoxs of fields in a table in SQL Server. When I
select Edit the Update and Cancel options appear - no problem. However
when I select the Update link I can't seem to access the updated values
in the TextBox fields. The only values that I can access are the values
in the fields that were binded prior to the Update event.
This is a simplified example , here I want the Label to display the
updated value of the TextBox.
public void EditDataGrid_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
string newData;
TextBox aTextBox;
aTextBox = (TextBox)(e.Item.Cells[1].Controls[0]);
newData = aTextBox.Text;
Label1.Text = newData;
}
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!