Set the Control To Validate property of Required Field Validator control to Text Box1 (i.e. Also, set its Error Message property to "Please enter company name".

gridview handle rowupdating-46gridview handle rowupdating-35gridview handle rowupdating-13

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.

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.

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).Is Bound Using Data Source ID; Grid View Update Event Handler handler1 = (Grid View Update Event Handler) base. Get String("Grid View_Unhandled Even t", new object[] { this. 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.A friend asked me to help him out on this and frankly it has me completely stumped as well.