Skip to main content

GridControl.ValidateRow Event

Allows you to validate row values.

Namespace: DevExpress.WinUI.Grid

Assembly: DevExpress.WinUI.Grid.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

public event EventHandler<GridRowValidationEventArgs> ValidateRow

Event Data

The ValidateRow event's data class is GridRowValidationEventArgs. 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 icon type. Inherited from ValidationEventArgs.
IsValid Gets or sets a value which specifies 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.

The event data class exposes the following methods:

Method Description
SetError(Object, ErrorType) Marks the processed input value as invalid and displays an error within the editor with the specified error icon type. Inherited from ValidationEventArgs.
SetError(Object) Marks the processed input value as invalid and displays an error within the editor. Inherited from ValidationEventArgs.

Remarks

The GridControl raises the ValidateRow event when the control saves changes to a data source. The save changes process starts when a user focuses another row, or you call the DataControlBase.CommitEditing method.

Refer to the following help topic for more information: Row Validation.

See Also