Gridview rowupdating cancel update

Rated 3.86/5 based on 526 customer reviews

We use the Row Updating event of Grid View to update the record in the database table.We get the Id value using the row index and another Text Box value is also retrieved.Point numbers 2 and 3 are performed after point 1 is performed.1.Row move in edit mode We have a Grid View with records.We can't update a record until that record doesn't exist in the input type field (Text Box).

The Edit Index property of a Grid View determines the index of a row in edit mode. Update record and get updated state of the Grid View.

Then have a seperate function to update the values entered and finally call your Bind Grid() function which again binds the gridview..

Note: I'm using stored procedure to update my DB table.

Create SQL Connection We need a connection with a Microsoft SQL Server database so we can access data and perform an operation on it.

We define a connection in the web.config file and give a name to the connection string.

Leave a Reply