Skip to main content

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

PivotGridControl.ValidatingEditor Event

Enables you to manually validate cell values.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.2.dll

NuGet Package: DevExpress.Win.PivotGrid

#Declaration

public event BaseContainerValidateEditorEventHandler ValidatingEditor

#Event Data

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

Property Description
ErrorText Gets or sets the error description.
Valid Gets or sets whether the value is valid.
Value Gets or sets the value being validated.

#Remarks

Editor validation takes place when attempting to save the edit value (using the PivotGridControl.PostEditor method) or when closing the active editor. First, automatic validation is performed. The editor determines whether it can accept the entered value. After automatic validation has been performed, the ValidatingEditor event is raised. Handle this event to implement custom constraints on cell values.

If the entered value is returned by the event parameter’s Value property. If it is invalid, set the Valid property to false. In this instance, the edit value is not saved, and the cell remains focused so that an end-user can correct it.

The default event handling result (displaying an error icon and tooltip leaving editor focus unchanged) can be overridden within the PivotGridControl.InvalidValueException event handler.

See Also