Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ListEditor.ValidateObject Event

Occurs when the object represented by the ListEditor‘s focused row must be validated.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public event EventHandler<ValidateObjectEventArgs> ValidateObject

#Event Data

The ValidateObject event's data class is ValidateObjectEventArgs. The following properties provide information specific to this event:

Property Description
ErrorText Specifies the message that must be displayed in a UI when the object being checked is not valid.
Object Provides access to the object that is being manipulated. Inherited from ObjectManipulatingEventArgs.
Valid Specifies whether the object that is being checked is valid or not.

#Remarks

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