corelibraries-devexpress-dot-mvvm-dot-xpf-dot-invaliditemexceptionargs.md
Gets or sets how to handle an exception.
Namespace : DevExpress.Mvvm.Xpf
Assembly : DevExpress.Mvvm.v25.2.dll
NuGet Packages : DevExpress.Mvvm, DevExpress.Win.Navigation
public ExceptionMode ExceptionMode { get; set; }
Public Property ExceptionMode As ExceptionMode
| Type | Description |
|---|---|
| ExceptionMode |
A value that specifies how to handle an exception.
|
Available values:
| Name | Description |
|---|---|
| DisplayError |
Displays an error message box with text specified by the ErrorText property. Use the WindowCaption property to specify the message box’s caption.
| | ThrowException |
Throws an exception. Use the Exception property to get this exception.
| | NoAction |
Displays an error icon and does not allow users to focus other rows until values are corrected.
| | Ignore |
Ignores an exception.
|
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.
wpf-data-grid-validate-data-rows/CS/ValidateRow_MVVM/MainViewModel.cs#L72
public void InvalidRow(InvalidRowExceptionArgs args) {
args.ExceptionMode = ExceptionMode.NoAction;
}
wpf-data-grid-validate-data-rows/VB/ValidateRow_MVVM/MainViewModel.vb#L63
Public Sub InvalidRow(ByVal args As InvalidRowExceptionArgs)
args.ExceptionMode = ExceptionMode.NoAction
End Sub
See Also
InvalidItemExceptionArgs Class