corelibraries-devexpress-dot-mvvm-dot-xpf-dot-rowcellvalidationargs.md
Gets the editor’s value.
Namespace : DevExpress.Mvvm.Xpf
Assembly : DevExpress.Mvvm.v25.2.dll
NuGet Packages : DevExpress.Mvvm, DevExpress.Win.Navigation
public object NewValue { get; }
Public ReadOnly Property NewValue As Object
| Type | Description |
|---|---|
| Object |
The editor’s value.
|
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NewValue 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-cell-editors/CS/ValidateCell_MVVM/MainViewModel.cs#L36
var cellValue = (double)args.OldValue;
var discount = 100 - Convert.ToDouble(args.NewValue) / cellValue * 100;
if(discount > 0 && discount <= 30)
wpf-data-grid-validate-cell-editors/VB/ValidateCell_MVVM/MainViewModel.vb#L43
Dim cellValue = CDbl(args.OldValue)
Dim discount = 100 - Convert.ToDouble(args.NewValue) / cellValue * 100
If discount > 0 AndAlso discount <= 30 Then Return
See Also