Updating a gridview

In this article we are going to take a look at an alternative method of updating only the changed rows.

This will improve performance in cases where you display a large number of rows to the user and the user only updates few rows.

The idea is to give the user an Excel like interface where they can edit the rows with custom data and finally click the update button to persist the data in the database.

Matt’s solution was great but lacks a very important detail.

In practical scenario you should use your existing architecture to populate and update the data.

In this article, I am going to take a simple database table that has following fields: Auto ID - Int, Auto Increment, Primary Key Page Name - Varchar(50) Page Description - Varchar(500) Active - Bit(1) In this article, I am not going to explain the workings of Sql objects but focusing on the events and methods of the Grid View that will help us in updating and deleting the records.

Leave a Reply