Gridview rowupdating new value
event is raised when a data row (represented by a Grid View Row object) is bound to data in the Grid View control.This enables you to provide an event-handling method that performs a custom routine, such as modifying the values of the data bound to the row, whenever this event occurs.Set the Control To Validate and Error message properties to the appropriate values. Up till now we used the validation controls to validate Grid View input on client and server side.
Now from the smart tag of the Grid View choose "Edit Template" and then select "Edit Item Template" of Company Name column.
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.
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.