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

BaseEdit.ErrorText Property

Gets or sets the error description for the editor.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

[Browsable(false)]
public string ErrorText { get; set; }

Property Value

Type Description
String

A string value specifying the error description for the editor.

Remarks

If the ErrorText property value is not an empty string, the editor displays an error icon at the left edge. The error description is displayed within the tooltip displayed when pointing to that icon.

The default error icon (ColumnView.SetColumnError_ErrorGlyph) is specified by the BaseEdit.DefaultErrorIcon property. You can assign a new icon to this property if required. It’s also possible to provide a custom error icon for a specific editor using the BaseEdit.ErrorIcon property.

Generally setting an editor error is useful when validating the editor value using the RepositoryItem.Validating event. If the value entered doesn’t match your validity criteria, you may leave the editor focused until the value is corrected. You can assign an appropriate string to the ErrorText property in the event handler so that users are informed how to correct the value entered.

The ErrorText property is also used internally when the control is used as an inplace editor in a container control.

Note that you can also use the ErrorProvider component as this provides a flexible way to indicate errors, especially for standalone data-bound controls.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ErrorText property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also