Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Input Validation

  • 2 minutes to read

You can validate new data before saving it to a data source. Likewise, you can ensure that invalid data is not saved to a data source and related errors are clearly displayed.

Validation

Note

When you use a custom CellTemplate, input validation is supported only if the template contains a BaseEdit class descendant that is declared as demonstrated in the following topic: Custom In-Place Cell Editors.

#GridControl Level

The GridControl raises special events that allow you to validate modified cells and rows:

#Data Level

You can validate data based on interfaces and attributes:

#Check Whether the Grid Contains Validation Errors

The GridControl includes the following properties that allow you to check whether the grid has validation errors:

#Examples