CustomColumnSortEventArgs.Result Property

Gets or sets the result of a custom comparison.

Namespace: DevExpress.UI.Xaml.Grid

Assembly: DevExpress.UI.Xaml.Grid.v18.1.dll

Declaration

public int Result { get; set; }
Public Property Result As Integer

Property Value

Type Description
Int32

An integer value that specifies the result.

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.