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

PivotCustomFieldSortEventArgs.Result Property

Gets or sets the result of a custom comparison.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v19.1.dll

Declaration

public int Result { get; set; }

Property Value

Type Description
Int32

An integer value specifying the custom comparison’s result.

Remarks

In the PivotGridControl.CustomFieldSort event handler set the result of the custom comparison operation as follows:

  • -1 if the Value1 should be placed before the Value2 when values are sorted in ascending order. When values are sorted in descending order, the first value is after the second value.
  • 1 if the Value1 should be placed after the Value2 when values are sorted in ascending order. When values are sorted in descending order, the first value is placed before the second value.
  • 0 to indicate that the values are equal. The rows are grouped into one field value.

Note

Values are sorted before grouping. If the values are equal (the e.Result is set to 0), they are in the same group.

Important

Set the e.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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.

See Also