The Grid View Update Event Args class has three important collections - Old Values, New Values and Keys.
The Ole Values collection contains list of old column values, the New Values collection contains the list of new values entered by the user and the Keys collection contains the list of primary key values as defined by Data Key Names.
In our example we will illustrate the use of Updating event for the validation purpose.
Add Grid View1_Row Updating event handler as shown below: The Row Updating event handler receives an event argument of type Grid View Update Event Args.
These events are raised before updating and deleting the record respectively.We need to convert these Bound Fields to Template Fields.In order to do so select "Edit Columns..." from the smart tag of the Grid View. Select Company Name and Contact Name fields and click on "Covert this field into a Template Field" link.This will convert them from Bound Field to Template Field.Now from the smart tag of the Grid View choose "Edit Template" and then select "Edit Item Template" of Company Name column.