Back to Devexpress

RuleSet.CustomIsEmptyValue Event

expressappframework-devexpress-dot-persistent-dot-validation-dot-ruleset.md

latest4.0 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Persistent.Base

Declaration

csharp
public static event EventHandler<CustomIsEmptyValueEventArgs> CustomIsEmptyValue
vb
Public Shared Event CustomIsEmptyValue As EventHandler(Of CustomIsEmptyValueEventArgs)

Event Data

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

PropertyDescription
HandledGets 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.
IsEmptySpecifies whether or not the validation rule’s target property value is considered to be empty.
PropertyNameGets the name of the validation rule’s target property.
PropertyValueGets the validation rule’s target property value.
ServiceProviderGets the IServiceProvider used to access the application’s services.
TargetObjectGets 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.

Note

You cannot use this event in a .NET application. Refer to the following section for more information: How to Subscribe to Validation Events

See Also

RuleSet Class

RuleSet Members

DevExpress.Persistent.Validation Namespace