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

CustomColumnSortEventArgs Class

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

public class CustomColumnSortEventArgs :
    GridCustomColumnSortEventArgs

Remarks

If a column’s GridDataColumnSettings.SortMode property is set to ‘Custom’, the ASPxGridView’s data can be sorted and grouped by this column using custom algorithms. To implement custom sorting and (or) grouping, handle the ASPxGridView.CustomColumnSort and ASPxGridView.CustomColumnGroup events. The CustomColumnSortEventArgs class provides data for these events.

When handling the ASPxGridView.CustomColumnSort event, the result indicates whether one row should be positioned above or below another row. For the ASPxGridView.CustomColumnGroup event, the result should indicate whether the two rows should be combined into the same group. The result is specified by the GridCustomColumnSortEventArgs.Result property.

The GridCustomColumnSortEventArgs.ListSourceRowIndex1 and GridCustomColumnSortEventArgs.ListSourceRowIndex2 properties specify the row indexes in the underlying data source.

To indicate that the comparison operation was handled, and no default processing is required, set the GridCustomColumnSortEventArgs.Handled property to true. Otherwise, the default comparison mechanism will be invoked after your event handler has been called, and this will override the custom result.

See Also