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.
Should I refrain from using Grid View, or Sql Data Source? Bye Alexander On updating, it is logical that all fields in the Grid View are sent, but when Deleting only the IDENTIFIER keys are sent, and these are accessed as you figured out in the Data Key Names.
In this example, I am going to retrieve values from categories table of Northwind database. Drag a Grid View into the Web Form and assign Data Key Names property with the primary key column i.e. In the gdview_Row Editing and gdview_Row Deleting event, we have used the below code to retrieve categoryid from datakey of Grid View, int catid = int.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.
The Grid View control is a tabular databound control but sometimes it is used like a spreadsheet control. NET 2.0 and is an improved version of the Data Grid control. We can use this to display data from a database and edit, sort and select the data.
Database Table Structure We are using an "EMPLOYEE" table so the "EMPLOYEE" table design is: Design of Grid View We design a Grid View with which we can perform update and delete operations.