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

ExceptionEventArgs.ExceptionMode Property

Gets or sets the type of response to supplying invalid values.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

public ExceptionMode ExceptionMode { get; set; }

Property Value

Type Description
ExceptionMode

A ExceptionMode enumeration value specifying the response type.

Available values:

Name Description
DisplayError

Displays a tooltip with an error description specified by the ExceptionEventArgs.ErrorText property.

ThrowException

Throws an exception specified by the ExceptionEventArgs.Exception property.

NoAction

Suppresses displaying the message box/tooltip or throwing an exception. The value remains unchanged.

Ignore

Discards new data and reverts to an old value.

Note

In standalone editors, because of the .NET binding mechanism, the Ignore value doesn’t work correctly. In container controls, the Ignore value works as expected.

Remarks

Use the ExceptionMode property to specify the action performed in response to entering an invalid value. You can display a message box/tooltip with a specific error description, suppress any action, throw an exception or discard new data and revert to an old value.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ExceptionMode 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