M
Mark Davidson
Hi,
I have a datagrid with template columns. Everything is OK except that when I put any of the row in edit mode and try to retrieve the new values, I get the old values instead of the new ones. The line of code in UpdateCommand handler of the grid is:
strUserID = CType(e.Item.FindControl("txtUserID"), TextBox).Text
I also tried the following but no luck:
strUserID = CType(e.Item.Cells(2).FindControl("txtUserID"), TextBox).Text
and
strUserID = CType(e.Item.Cells(2).Controls(0), TextBox).Text
Any ideas would be much appreciated.
Mark
I have a datagrid with template columns. Everything is OK except that when I put any of the row in edit mode and try to retrieve the new values, I get the old values instead of the new ones. The line of code in UpdateCommand handler of the grid is:
strUserID = CType(e.Item.FindControl("txtUserID"), TextBox).Text
I also tried the following but no luck:
strUserID = CType(e.Item.Cells(2).FindControl("txtUserID"), TextBox).Text
and
strUserID = CType(e.Item.Cells(2).Controls(0), TextBox).Text
Any ideas would be much appreciated.
Mark