Back to Devexpress

PropertyGridControl.ValidateCell Event

wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertygridcontrol-ce7cf455.md

latest5.1 KB
Original Source

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

NuGet Package : DevExpress.Wpf.PropertyGrid

Declaration

csharp
public event ValidateCellEventHandler ValidateCell
vb
Public Event ValidateCell As ValidateCellEventHandler

Event Data

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

PropertyDescription
ErrorContentGets or sets an object that describes the validation error.
ErrorTypeGets the error type.
HandledGets 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.
IsValidGets or sets a value specifying whether the value is valid.
NewValueGets a new value of the cell to be validated.
OldValueGets the previous value of the cell to be validated.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
RowGets information about a row that contains a validated cell.
SourceGets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.
ValidationExceptionGets or sets the error message that is displayed if the cell has failed validation.

The event data class exposes the following methods:

MethodDescription
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

PropertyGridControl Class

PropertyGridControl Members

DevExpress.Xpf.PropertyGrid Namespace