Back to Devexpress

TreeList.ValidatingEditor Event

windowsforms-devexpress-dot-xtratreelist-dot-treelist-94423d96.md

latest2.9 KB
Original Source

TreeList.ValidatingEditor Event

Fires when an editor is validated.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[DXCategory("Editor")]
public event BaseContainerValidateEditorEventHandler ValidatingEditor
vb
<DXCategory("Editor")>
Public Event ValidatingEditor As BaseContainerValidateEditorEventHandler

Event Data

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

PropertyDescription
ErrorTextGets or sets the error description.
ValidGets or sets whether the value is valid.
ValueGets 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

InvalidValueException

HiddenEditor

CloseEditor()

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace