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

GridCustomColumnSortEventArgs.Result Property

Gets or sets the result of a custom comparison.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

public int Result { get; set; }

Property Value

Type Description
Int32

An integer value that specifies the result.

Remarks

Find control-specific information (for ASPxGridView, ASPxCardView or ASPxVerticalGrid) in the sections below.

ASPxGridView

Use the Result property to set the result of the custom comparison of the two rows being processed. The row values within the column being processed are specified by the GridCustomColumnSortEventArgs.Value1 and GridCustomColumnSortEventArgs.Value2 properties.

When handling the ASPxGridView.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 indexes in the data source.

When handling the ASPxGridView.CustomColumnGroup event, the result should be set as shown below:

  • set Result to 0, to indicate that the rows should be combined into the same group;
  • set Result to 1 (or -1) to indicate that the rows should be placed within different groups.

Grid View - Getting Started

ASPxCardView

Use the Result property to set the result of the custom comparison of the two cards being processed. The card values in the column being processed are specified by the GridCustomColumnSortEventArgs.Value1 and GridCustomColumnSortEventArgs.Value2 properties.

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

  • set Result to -1 if the first card should be positioned above the second card when data is sorted in ascending order. When data is sorted in descending order, the first card will be positioned below the second card.
  • set Result to 1 if the first card should be positioned below the second card when data is sorted in ascending order. When data is sorted in descending order, the first card will be positioned above the second card.
  • set Result to 0 to indicate that the cards are equal. In this case, the cards will be arranged in the grid according to their indexes in the data source.

Card View - Getting Started

ASPxVerticalGrid

Use the Result property to set the result of the custom comparison of the two records being processed. The record values in the column being processed are specified by the GridCustomColumnSortEventArgs.Value1 and GridCustomColumnSortEventArgs.Value2 properties.

When handling the ASPxVerticalGrid.CustomRowSort event, the result must be set as follows:

  • set Result to -1 if the first record should be positioned above the second record when data is sorted in ascending order. When data is sorted in descending order, the first record will be positioned below the second record.
  • set Result to 1 if the first record should be positioned below the second record when data is sorted in ascending order. When data is sorted in descending order, the first record will be positioned above the second record.
  • set Result to 0 to indicate that the records are equal. In this case, the records will be arranged in the grid according to their indexes in the data source.

Vertical Grid - Getting Started

See Also