You shouln't need any Bind or Eval statements for Employee ID since it is already specified in Data Key Names.Your problem begins with the actual UPDATE SQL command that your datasource generates.I was able to get everything to work correctly with the Grid View except when it came to performing an update.
Grid View was filled with the old values again, so in my Grid.
Hey, I've been working a gridview that uses an Object Data Source to perform either select, insert, delete or update.
It can done easy with the help of the Update Panel Animation Extender.
Only placing the animated gif in the center of the Grid View was only slightly more difficult.
I am binding to a custom datasource in the code behind.
It gets into the "On Row Updating" event just fine, but there are no New Values or Old Values. Regarding on the Grid View control's Row Updating event problem, it is the expected behavior because when we do not associate Grid View(or other ASP.
NET 2.0 databound control) with Data Source control, it won't automatically query and fill the parameters collection of the updating/deleting/... In such cases, we need to manually extract the field values from the Template control. In that case you can do it using the Extract Values From Cell method to make the New Values collection yourself.
EDIT: I found a piece of code in the comments of this blog: I was doing databinding in my Page_Load event and when I clicked "Update" the Post Back was done, so was the Page_Load event fired.
Ok, So I was able to resolve this issue by going into the On Updating event in the Object Data Source and doing the following below.
This effectively removes the additional parameters from being added. There doesn't appear to be any values actually being passed into this method. Can anyone explain to me why my values are not being carried forward?
Common" Update Method="Save Pipeline User" On Inserting="obj Common_Inserting" On Updating="obj Common_Updating" This means that the First Name column from your db will be printed in the column.