Skip to main content

ExceptionEventArgs.ExceptionMode Property

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

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public ExceptionMode ExceptionMode { get; set; }

Property Value

Type Description
ExceptionMode

A ExceptionMode enumeration value specifying the response type.

Available values:

Name Description
DisplayError

A control displays a tooltip or message box with an error description specified by the ExceptionEventArgs.ErrorText property. A tooltip is displayed for invalid cells. A message box is displayed for invalid rows (records).

ThrowException

A control throws an exception specified by the ExceptionEventArgs.Exception property.

NoAction

A control suppresses an error message box/tooltip and exceptions. Values remain 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 snippet (auto-collected from DevExpress Examples) contains a reference 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