Skip to main content

TreeList.ValidatingEditor Event

Fires when an editor is validated.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v23.2.dll

NuGet Packages: DevExpress.Win.Navigation, 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