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
NuGet Package: DevExpress.Persistent.Base
#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 Handled |
Is |
Specifies whether or not the validation rule’s target property value is considered to be empty. |
Property |
Gets the name of the validation rule’s target property. |
Property |
Gets the validation rule’s target property value. |
Service |
Gets the IService |
Target |
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.