Enter the database details as per your setup and click on OK.On the next step select Customer ID, Company Name, Contact Name and Country columns (Figure 2). NET 2.0 Grid View control allows us to quickly edit and delete records.However, most of the real world cases call for validating the data being edited or deleted. Drag and drop an SQL Data Source control on the web form.Right click on the Grid View and select "End template editing" Run the web form.Click on the Edit button of the Grid View so that it goes into the edit mode.This tells Grid View that the event handler should be cancelled.



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.This will display the template designer for the column as shown in Figure 6.Next, drag and drop a Required Field Validation control below the Text Box.Out of these events Row Updating and Row Deleting are possibly the most common ones.These events are raised before updating and deleting the record respectively.