How to: Validate Data On the Client

This example shows how to implement client-side validation when using custom editors within the Edit Form's template.

To enable the client-side validation, the standard Update button is replaced with a custom button. The custom button's Click event is handled to validate data. If data is valid, the grid's client-side ASPxClientGridView.UpdateEdit method is called.

The editor's validation settings can be accessed and specified using the ASPxEdit.ValidationSettings property. In this example, empty strings are not allowed. In this instance, if the validation fails, error icons are displayed next to the editors with invalid values.