Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Data Validation

New
First Name 
Last Name 
Age 
E-mail
 
Arrival Date 
EditAndrewFuller42andrew.fuller@devexpress.com3/17/2024
EditNancyDavolio34nancy.davolio@devexpress.com4/22/2024
EditMargaretPeackop48margaret.peackop.devexpress.com4/24/2024
EditRobertK29robert.king@devexpress.com4/23/2024
EditAnneDodsworth17anne.dodsworth@devexpress.com4/22/2024

The ASPxGridView allows you to manually validate the edited row and display errors for invalid fields.

This demo illustrates ways in which you can include data validation in your next ASP.NET project. Validation is implemented in the RowValidating event handler.

To indicate rows with invalid data, the HtmlRowPrepared event is handled. This event is raised for each data row when the corresponding row within the table has been created. In this sample, rows with invalid data are colored in red.

Click the ‘Edit’ link to display the details of this row, with an error icon indicating the invalid field. Hover your mouse over the icon to display a hint along with a description of the error.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxGridViewDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxGridViewDemos