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

GridControl.ValidateRow Event

Enables you to specify whether the focused row's data is valid, and whether the row can lose focus.

Namespace: DevExpress.UI.Xaml.Grid

Assembly: DevExpress.UI.Xaml.Grid.v19.1.dll

Declaration

public event GridRowValidationEventHandler ValidateRow
Public Event ValidateRow As GridRowValidationEventHandler

Event Data

The ValidateRow event handler receives an argument of the GridRowValidationEventArgs type. The following properties provide information specific to this event.

Property Description
ErrorContent Gets or sets an object that describes the validation error.
(Inherited from ValidationEventArgs)
ErrorType Gets or sets the error type.
(Inherited from ValidationEventArgs)
IsValid Gets or sets a value specifying whether the value is valid.
(Inherited from ValidationEventArgs)
Row Gets the processed row.
RowHandle Gets the processed row's handle.
UpdateSource Gets the action that caused the validation.
(Inherited from ValidationEventArgs)
Value Gets the editor's value.
(Inherited from ValidationEventArgs)

Remarks

Row validation is performed within the ValidateRow event handler. This event is automatically fired after the focused row's data has been modified and it is about to lose focus. To manually force row validation, call the DataControlBase.CommitEditing method.

The processed row is returned by the event parameter's GridRowValidationEventArgs.Row property. Its handle is returned by the GridRowValidationEventArgs.RowHandle. After cell values have been obtained, you can verify whether these values meet your validity criteria. If the row fails validation, set the event's IsValid parameter to false. Otherwise, leave the IsValid parameter set to true.

To learn more, see Row Validation.

See Also