Skip to main content
.NET 6.0+

DevExpress v24.1 Update — Your Feedback Matters

Our What's New in v24.1 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

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.v24.1.dll

#Declaration

public event EventHandler<ContextValidatingEventArgs> ContextValidating

#Event Data

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

Property Description
Context Specifies the validation context whose associated validation rules are about to be checked.
TargetObjects Specifies the objects that are about to be validated in the validation context specified by the ContextValidatingEventArgs.Context property.

#Remarks

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.

See Also