Gridview1 rowupdating old values
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.
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".
Let's proceed further by validating on the server side.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.Click on the "Advanced" button and check the "Generate INSERT, UPDATE and DELETE statements" checkbox (Figure 3). Now that you have configured the SQL Data Source control let's bind it with a Grid View control. Open its smart tag and configure it as shown in Figure 4.Here, we set the Data Source of the Grid View to Sql Data Source1. We also enable paging, sorting and editing features of the Grid View.
This tells Grid View that the event handler should be cancelled.