Rowupdating e cancel Camchatadulte

This will display the template designer for the column as shown in Figure 6.

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.

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.

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.

There can be several approaches taken for validating data. For our example we are going to use Customers table of Northwind database. Open its smart tag and choose "Configure Data Source" option to start Configure Data Source wizard.

On the first step of the wizard click on "New Connection" button to open a dialog as shown in Figure 1.

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).

By default when the Grid View controls goes in edit mode, it displays Text Boxes for entering values.