Skip to main content
A newer version of this page is available. .

PivotGridCustomFieldSortEventArgsBase<T>.Result Property

Gets or sets the result of a custom comparison.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v20.2.Core.dll

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.WindowsDesktop.PivotGrid.Core

Declaration

public int Result { get; set; }

Property Value

Type Description
Int32

An integer value that specifies the custom comparison result.

Remarks

When handling the CustomFieldSort event, the result of the custom comparison operation is set as follows:

  • Set the Result to -1 if the first row should be positioned above the second row when data is sorted in ascending order. When data is sorted in descending order, the first row will be positioned below the second row.
  • Set the Result to 1 if the first row should be positioned below the second row when data is sorted in ascending order. When data is sorted in descending order, the first row will be positioned above the second row.
  • Set the Result to 0 to indicate that the rows are equal. In this case, the compared rows will be grouped into one field value.

Note

Set the PivotGridCustomFieldSortEventArgsBase<T>.Handled property to true to finalize the comparison and use the e.Result value. Otherwise, the default comparison is in effect and e.Result is ignored.

For more information, refer to the platform-specific events:

WinForms ASP.NET ASP.NET MVC WPF
CustomFieldSort CustomFieldSort CustomFieldSort CustomFieldSort
See Also