Skip to main content

CustomColumnSortEventArgs.Result Property

Gets or sets the result of a custom comparison.

Namespace: DevExpress.WinUI.Grid

Assembly: DevExpress.WinUI.Grid.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

public int Result { get; set; }

Property Value

Type Description
Int32

An integer value that specifies the result.

Remarks

Use the Result property to set the result of the custom comparison of the two rows being processed. The compared values are returned by the CustomColumnSortEventArgs.Value1 and CustomColumnSortEventArgs.Value2 properties.

When handling the GridControl.CustomColumnSort event, the result must be set as follows:

  • Set 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 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 Result to 0 to indicate that the rows are equal. In this case, the rows will be arranged within the grid according to their indices in a data source.
See Also