Rowupdating gridview newvalues empty

I want to provide my user a Gridview filled with data from database, allowing him to edit these records not in order to update the database, but in order to insert edited rows in db as new records through a stored procedure.

Nor does it represent the opinion of my dog, because I don’t have one.

step through your code in build Grid() and make sure you're seeing what you expect, on postback. Normally during this step the Grid View still has columns populated with controls. It is as if all of the column Template Fields are deleted on post Back BEFORE my Row Updating event fires.

In all of the examples I have seen online, they have no trouble accessing the columns or controls after a postback which is why I am completely stumped. However, when I rebuild the Grid View I am pulling data from the Data Set which has yet to be updated with the new data that the user enetered.

However if when I try to reference these columns, there are no controls in them, so that didn't work. explanation: yes, that's because alongwith creating templatefields you also bind the data, which is the original data.

so, in the first place and as you realize quite well, you need to separate the databinding versus templatefield creation (the latter can be dependent on the dataset as long as you don't bind). Is Post Back in Page Load, just like you were already doing but for something else: page_load OK I got it. Text; echo field "User Entered Value" Thanks for all the help!

Search for rowupdating gridview newvalues empty:

rowupdating gridview newvalues empty-16

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “rowupdating gridview newvalues empty”