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

RuleSet.CustomIsEmptyValue Event

Occurs when the RuleSet.IsEmptyValue method is executed to determine whether or not the property value is considered empty.

Namespace: DevExpress.Persistent.Validation

Assembly: DevExpress.Persistent.Base.v24.2.dll

#Declaration

public static event EventHandler<CustomIsEmptyValueEventArgs> CustomIsEmptyValue

#Event Data

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

Property Description
Handled Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs.
IsEmpty Specifies whether or not the validation rule’s target property value is considered to be empty.
PropertyName Gets the name of the validation rule’s target property.
PropertyValue Gets the validation rule’s target property value.
ServiceProvider Gets the IServiceProvider used to access the application’s services.
TargetObject Gets the validation rule’s target object.

#Remarks

Note that the event occurs at the validation process of each rule to determine whether a property value should be considered empty.

Handle this event to determine when the RuleRequiredFieldAttribute validation rule considers that its target property has a value. Access the handler’s CustomIsEmptyValueEventArgs.TargetObject, CustomIsEmptyValueEventArgs.PropertyName and CustomIsEmptyValueEventArgs.PropertyValue parameters to implement the custom validation logic. Pass the validation result via the handler’s CustomIsEmptyValueEventArgs.IsEmpty parameter and set the Handled parameter to true.

See Also