Gridview templatefield not updating
All samples of course assume you’re doing everything in your page, but I have to do everything in my code-behind, because on forehand I don’t know what I’ll be binding to my Grid View.
Check out what I’m trying to do, maybe you can help?
Last line of the following code is calling a local method for updating the database and passing all the parameters to this method.
To do this we first need to obtain the reference of the current row by using its index no as shown in the first line below.
By using the Grid View Row object we can find the reference of any control in the row in which user is editing the data.
When we edit a row in our Grid View and press the “Update” button, at some time it’s received in the Row Updating method.
But as I noted in the comments in that method, some collections that should contain the columns (names, old values and new values) are always empty. And the Row Updated method is never even touched!!! NET Forums that I need to use a Data Source control.