Back to Devexpress

InvalidItemExceptionArgs.ErrorText Property

corelibraries-devexpress-dot-mvvm-dot-xpf-dot-invaliditemexceptionargs-47b1b3ef.md

latest2.9 KB
Original Source

InvalidItemExceptionArgs.ErrorText Property

Gets or sets the error description.

Namespace : DevExpress.Mvvm.Xpf

Assembly : DevExpress.Mvvm.v25.2.dll

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

Declaration

csharp
public string ErrorText { get; set; }
vb
Public Property ErrorText As String

Property Value

TypeDescription
String

The error description.

|

Remarks

Set the ExceptionMode property to DisplayError to display an error message box with text specified by the ErrorText property. Use the WindowCaption property to specify the message box’s caption.

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.

wpf-data-grid-initialize-new-item-row-with-default-values/CS/NewItemRow_MVVM/MainViewModel.cs#L51

csharp
if(args.IsNewItem) {
    args.ErrorText = "Please enter the Product Name.";
    args.WindowCaption = "Input Error";

wpf-data-grid-initialize-new-item-row-with-default-values/VB/NewItemRow_MVVM/MainViewModel.vb#L59

vb
If args.IsNewItem Then
    args.ErrorText = "Please enter the Product Name."
    args.WindowCaption = "Input Error"

See Also

InvalidItemExceptionArgs Class

InvalidItemExceptionArgs Members

DevExpress.Mvvm.Xpf Namespace