Gridview edit row updating

They are enabled only when the Grid View enters edit mode.

The __do Post Back() call of the Edit button takes ID of the Grid View as the first parameter and row number in the form Edit$ as the second parameter.This article scope is limited to Updating and Deleting records using Grid View and I am not using any readymade Data controls for that but manually writing all event methods.I will be using Sql objects directly into methods to keep the example simple and straight forward.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.

Search for gridview edit row updating:

gridview edit row updating-22

The easiest way to do so is to handle Row Data Bound event of the Grid View control as shown below: The Row Data Bound event is raised for each and every row of the Grid View while it is being data bound with the underlying data source. The Edit, Update and Cancel buttons are displayed only for grid rows of type Data Row.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “gridview edit row updating”