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".
Note that by default all validation controls validate on the client side.
Just like we attached the Required Field Validator control to the Text Box, attach a Custom Validator to the Contact Name column. If you run the web form and try entering wrong value in the Contact Name column then you will see the error message displayed as before and the value will not be accepted by the Grid View control.This example shows how to edit and update records in a Grid View in ASP. This example is helpful in situations where an administrator needs to edit several records from the database.For demonstration I have created a database (named Database.mdf) in which we have a table named tbl_Employee.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.