ListView.ValidateObject Event

Occurs when the object represented by the ListView's focused row must be validated.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public event EventHandler<ValidateObjectEventArgs> ValidateObject
Public Event ValidateObject As EventHandler(Of ValidateObjectEventArgs)

The event handler receives an argument of the ValidateObjectEventArgs type.

Property Description
ErrorText

Specifies the message that must be displayed in a UI when the object being checked is not valid.

Valid

Specifies whether the object that is being checked is valid or not.

Handle this event to perform custom validation of the objects represented by an editable List View. The object that is being validated can be accessed via the handler's Object parameter. Check whether it is valid, and if it is not, set the ValidateObjectEventArgs.Valid to false and the ValidateObjectEventArgs.ErrorText to the message that must be displayed in a UI. In this instance, it will be impossible to change the focused row until the entered data is corrected.

See Also