Grid Editing - Validation

Validation

#
FirstName
LastName
Age
Email
ArrivalDate
EditNewAndrewFuller42andrew.fuller@devexpress.com12/5/2008
EditNewNancyDavolio34nancy.davolio@devexpress.com1/10/2009
EditNewMargaretPeackop48margaret.peackop.devexpress.com1/12/2009
EditNewRobertK29robert.king@devexpress.com1/11/2009
EditNewAnneDodsworth17anne.dodsworth@devexpress.com1/10/2009
Description
C#
VB
ASPX

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 within the RowValidating event handler. Invalid values are indicated via error icons. Hovering your mouse over the icon displays a hint along with a description of the error.

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 painted red.