corelibraries-devexpress-dot-mvvm-dot-xpf-dot-validationargs.md
Gets or sets an error description if row data are invalid. Null if data are valid.
Namespace : DevExpress.Mvvm.Xpf
Assembly : DevExpress.Mvvm.v25.2.dll
NuGet Packages : DevExpress.Mvvm, DevExpress.Win.Navigation
public ValidationErrorInfo Result { get; set; }
Public Property Result As ValidationErrorInfo
| Type | Description |
|---|---|
| ValidationErrorInfo |
An error description.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Result 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-extend-crud-operations/CS/Undo/UndoCRUDOperationsBehavior.cs#L112
AssociatedObject.ValidateRowCommand?.Execute(args);
if(!Validate(args.Result)) {
return;
wpf-data-grid-initialize-new-item-row-with-default-values/CS/NewItemRow_MVVM/MainViewModel.cs#L45
if(args.IsNewItem && string.IsNullOrEmpty(((Product)args.Item).ProductName)) {
args.Result = new ValidationErrorInfo("Please enter the Product Name.");
}
wpf-data-grid-validate-cell-editors/CS/ValidateCell_MVVM/MainViewModel.cs#L43
: $"The discount cannot be greater than 30% ({cellValue * 0.7}). Please correct the price.";
args.Result = new ValidationErrorInfo(error, ValidationErrorType.Critical);
}
wpf-data-grid-validate-data-rows/CS/ValidateRow_MVVM/MainViewModel.cs#L60
public void ValidateRow(RowValidationArgs args) {
args.Result = GetValidationErrorInfo((Task)args.Item);
}
wpf-data-grid-extend-crud-operations/VB/Undo/UndoCRUDOperationsBehavior.vb#L141
AssociatedObject.ValidateRowCommand?.Execute(args)
If Not Validate(args.Result) Then
Return
wpf-data-grid-initialize-new-item-row-with-default-values/VB/NewItemRow_MVVM/MainViewModel.vb#L52
If args.IsNewItem AndAlso String.IsNullOrEmpty(CType(args.Item, Product).ProductName) Then
args.Result = New ValidationErrorInfo("Please enter the Product Name.")
End If
wpf-data-grid-validate-cell-editors/VB/ValidateCell_MVVM/MainViewModel.vb#L46
Dim [error] = If(discount < 0, $"The price cannot be greater than {cellValue}", $"The discount cannot be greater than 30% ({cellValue * 0.7}). Please correct the price.")
args.Result = New ValidationErrorInfo([error], ValidationErrorType.Critical)
End Sub
wpf-data-grid-validate-data-rows/VB/ValidateRow_MVVM/MainViewModel.vb#L52
Public Sub ValidateRow(ByVal args As RowValidationArgs)
args.Result = GetValidationErrorInfo(CType(args.Item, Task))
End Sub
See Also