PersistenceValidationController.ContextValidating Event

Occurs when validation rules associated with the Delete or Save validation contexts are about to be checked.

Namespace: DevExpress.ExpressApp.Validation

Assembly: DevExpress.ExpressApp.Validation.v18.1.dll


public event EventHandler<ContextValidatingEventArgs> ContextValidating

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

Handle this event to modify the collection of objects which will be validated in the current context. Check the current validation context using the Context property and add the required objects to the TargetObjects list.

See the example of using the ContextValidating event in the PersistenceValidationController class description.