The requested page is not available for the requested platform. You are viewing the content for Default platform.

Editor Validation

When an end-user modifies a focused cell's value and tries to save changes (by pressing the ENTER key or moving focus to another cell), the grid validates a new value. First, this value is validated by the editor itself. Then, the column's ColumnBase.Validate event is raised to allow you to manually validate the cell's value. Note that this event is not fired when cell values are changed in code.

  • Validating a New Value

    The event parameter's Value property returns the focused cell's new value that should be validated. The old value is returned by the CellValue property. If the new value meets the validation rules, set the event parameter's IsValid property to true. Otherwise, set the IsValid property to false. In this case, the cell focus cannot be moved to another cell until the cell's value is corrected.

  • Indicating Errors

    If you've set the IsValid property to false, an error icon is displayed within the edited cell. Use the event parameter's ErrorType property to specify the required icon.