Back to Devexpress

InvalidRowExceptionEventArgs.ErrorText Property

wpf-devexpress-dot-xpf-dot-grid-dot-invalidrowexceptioneventargs.md

latest3.0 KB
Original Source

InvalidRowExceptionEventArgs.ErrorText Property

Gets or sets the error description.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

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

Property Value

TypeDescription
String

A String value that specifies the error description.

|

Remarks

If the InvalidRowExceptionEventArgs.ExceptionMode property is set to ExceptionMode.DisplayError, the ErrorText property specifies the text displayed within an error message box. The message box’s caption is specified by the InvalidRowExceptionEventArgs.WindowCaption property.

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_CodeBehind/MainWindow.xaml.cs#L49

csharp
if(e.RowHandle == GridControl.NewItemRowHandle) {
    e.ErrorText = "Please enter the Product Name.";
    e.WindowCaption = "Input Error";

wpf-data-grid-initialize-new-item-row-with-default-values/VB/NewItemRow_CodeBehind/MainWindow.xaml.vb#L54

vb
If e.RowHandle = DataControlBase.NewItemRowHandle Then
    e.ErrorText = "Please enter the Product Name."
    e.WindowCaption = "Input Error"

See Also

InvalidRowExceptionEventArgs Class

InvalidRowExceptionEventArgs Members

DevExpress.Xpf.Grid Namespace