Back to Devexpress

CustomColumnSortEventArgs.Value2 Property

wpf-devexpress-dot-xpf-dot-grid-dot-customcolumnsorteventargs-dot-value2.md

latest3.3 KB
Original Source

CustomColumnSortEventArgs.Value2 Property

Gets the second value being compared.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

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

Property Value

TypeDescription
Object

An object that represents the second of the two values being compared.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Value2 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-implement-custom-grouping/CS/CustomGrouping_CodeBehind/MainWindow.xaml.cs#L43

csharp
double x = Math.Floor(Convert.ToDouble(e.Value1) / 10);
double y = Math.Floor(Convert.ToDouble(e.Value2) / 10);
e.Result = x > 9 && y > 9 ? 0 : x.CompareTo(y);

wpf-data-grid-implement-custom-sorting/CS/CustomSorting_CodeBehind/MainWindow.xaml.cs#L43

csharp
int dayIndex1 = GetDayIndex(e.Value1);
int dayIndex2 = GetDayIndex(e.Value2);
e.Result = dayIndex1.CompareTo(dayIndex2);

wpf-data-grid-implement-custom-grouping/VB/CustomGrouping_CodeBehind/MainWindow.xaml.vb#L43

vb
Dim x As Double = Math.Floor(Convert.ToDouble(e.Value1) / 10)
Dim y As Double = Math.Floor(Convert.ToDouble(e.Value2) / 10)
e.Result = If(x > 9 AndAlso y > 9, 0, x.CompareTo(y))

wpf-data-grid-implement-custom-sorting/VB/CustomSorting_CodeBehind/MainWindow.xaml.vb#L50

vb
Dim dayIndex1 As Integer = Me.GetDayIndex(e.Value1)
Dim dayIndex2 As Integer = Me.GetDayIndex(e.Value2)
e.Result = dayIndex1.CompareTo(dayIndex2)

See Also

CustomColumnSortEventArgs Class

CustomColumnSortEventArgs Members

DevExpress.Xpf.Grid Namespace