Skip to main content
A newer version of this page is available. .

TreeList.ValidatingEditor Event

Fires when an editor is validated.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v22.1.dll

NuGet Package: DevExpress.Win.TreeList

Declaration

[DXCategory("Editor")]
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

The ValidatingEditor event fires when the TreeList.PostEditor or TreeList.CloseEditor method is called. This can occur when end-users stop editing a cell value or when you call one of these methods manually. Write a handler for the event to check the entered value’s validity. This event enables you to prevent the editor from losing focus or to correct the entered value. Note that the editor remains focused if the checked value hasn’t been accepted (the BaseContainerValidateEditorEventArgs.Valid parameter is set to false).

If the accepted value is invalid, the TreeList.InvalidValueException event is raised.

See Also