Skip to main content

PropertyGridControl.ValidateCell Event

Enables you to specify whether the focused cell’s data is valid, and whether the node can lose focus.

Namespace: DevExpress.Xpf.PropertyGrid

Assembly: DevExpress.Xpf.PropertyGrid.v24.1.dll

NuGet Package: DevExpress.Wpf.PropertyGrid

Declaration

public event ValidateCellEventHandler ValidateCell

Event Data

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

Property Description
ErrorContent Gets or sets an object that describes the validation error.
ErrorType Gets the error type.
Handled Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.
IsValid Gets or sets a value specifying whether the value is valid.
NewValue Gets a new value of the cell to be validated.
OldValue Gets the previous value of the cell to be validated.
OriginalSource Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEvent Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
Row Gets information about a row that contains a validated cell.
Source Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.
ValidationException Gets or sets the error message that is displayed if the cell has failed validation.

The event data class exposes the following methods:

Method Description
InvokeEventHandler(Delegate, Object) When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation. Inherited from RoutedEventArgs.
OnSetSource(Object) When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes. Inherited from RoutedEventArgs.

Remarks

Validation is performed within the ValidateCell event handler. This event is automatically fired when a cell is about to lose focus.

See Also