Asp net onupdating

Hey, I've been working a gridview that uses an Object Data Source to perform either select, insert, delete or update.

I was able to get everything to work correctly with the Grid View except when it came to performing an update.

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.

Common" Update Method="Save Pipeline User" On Inserting="obj Common_Inserting" On Updating="obj Common_Updating" Your DELETE linkbutton shouldn't need to pass Employee ID to the datasource, again, since it is in Data Key Names.Delete Method="Delete Pipeline User" Insert Method="Save Pipeline User" Select Method="Get Pipeline User" Type Name="PTCPipeline.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.However, you shouldn't need to specify a Bind for Employee ID since it is in the Data Key Names of your Grid View (the primary key).You shouln't need any Bind or Eval statements for Employee ID since it is already specified in Data Key Names.

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.

Please or register to post comments
If spammers comment on your content, only you can see and manage such comments Delete all

Asp net onupdating introduction

Asp net onupdating

Recent posts

21-Nov-2018 01:43
21-Nov-2018 09:20
21-Nov-2018 11:50
21-Nov-2018 16:09