Back to Devexpress

CellValueChangedEventArgs.OldValue Property

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

latest2.5 KB
Original Source

CellValueChangedEventArgs.OldValue Property

Gets the cell’s previous value.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public object OldValue { get; }
vb
Public ReadOnly Property OldValue As Object

Property Value

TypeDescription
Object

An object that represents the cell’s previous value.

|

Remarks

The cell’s new value is returned by the CellValueEventArgs.Value property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the OldValue 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-change-background-color-for-modified-cells/CS/HighlightChangedCellBehavior.cs#L46

csharp
else
    originalValues[key] = e.OldValue;
AssociatedObject.SetCellValue(e.RowHandle, fieldName, isModified);

wpf-data-grid-change-background-color-for-modified-cells/VB/HighlightChangedCellBehavior.vb#L65

vb
Else
    Me.originalValues(key) = e.OldValue
End If

See Also

CellValueChangedEventArgs Class

CellValueChangedEventArgs Members

DevExpress.Xpf.Grid Namespace