Gridview rowupdating not giving new values

Rated 4.55/5 based on 756 customer reviews

New Values,this is equal to Nothing, I Bind it to List object.I've tried not to bind the grid in Row Updating event,but then the editing row does not close and the row is not being updated.

Take a look at the page load if you are binding on post back then the values get updated before you are able to access them.In my approach, you can leave the commandfield as is, then you can hide it as needed via code behind.Next event is the Grid View Row Editing event to give Grid View index no of the editable row. This example shows how to edit and update records in a Grid View in.This collection only requires the row index no and it will give us the primary key.Last line of the following code is calling a local method for updating the database and passing all the parameters to this method.

Leave a Reply