All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

SortArgs.Result Property

Gets or sets the result of a custom comparison.

Namespace: DevExpress.Mvvm.Xpf

Assembly: DevExpress.Mvvm.v21.1.dll

Declaration

public int? Result { get; set; }

Property Value

Type Description
Nullable<Int32>

The result of a custom comparison.

Remarks

To apply custom sort or group operations, compare two rows and assign the result of the comparison to the Result property. The FirstValue and SecondValue parameters identify the values of these rows in the FieldName column.

When you execute a command bound to the GridControl.CustomColumnSortCommand and TreeListView.CustomColumnSortCommand properties, set the result as follows:

  • -1 to position the first row above the second row when data is sorted in ascending order. When data is sorted in descending order, the GridControl positions the first row below the second row.

  • 1 to position the first row below the second row when data is sorted in ascending order. When data is sorted in descending order, the GridControl positions the first row above the second row.

  • 0 to indicate that the rows are equal. In this case, the GridControl arranges rows according to their indices in a data source.

When you execute a command bound to the GridControl.CustomColumnGroupCommand property, set the result as follows:

  • 0 to combine the rows into the same group.
  • 1 (or -1) to place the rows in different groups.
See Also