The requested page is not available for the requested platform. You are viewing the content for Default platform.

GridColumn.SortOrder Property

Gets or sets the column's sort order. This is a bindable property.

Namespace: DevExpress.Mobile.DataGrid

Assembly: DevExpress.Mobile.Grid.v18.2.dll

Declaration

[XtraSerializableProperty]
public ColumnSortOrder SortOrder { get; set; }
<XtraSerializableProperty>
Public Property SortOrder As ColumnSortOrder

Property Value

Type Description
ColumnSortOrder

A ColumnSortOrder enumeration value specifying the column's sort order.

Remarks

Important

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

Get the SortOrder property value to determine which sort order is currently applied to the column. Assign a value to this property to sort data by the current column's values.

By default, data in a grid can be sorted by one column at a time (the GridControl.SortMode property is set to GridSortMode.Single). In this case, applying sorting to a column clears sorting previously applied to another column by setting its SortOrder property to ColumnSortOrder.None. If sorting data by multiple columns is enabled (the GridControl.SortMode property is set to GridSortMode.Multiple), any previous sorting is not cleared when changing the SortOrder property value. The new sort order applies an additional sorting condition to the one previously applied. To specify the sequence of applying sorting to columns, assign the GridColumn.SortIndex of these columns.

Another way to sort data in the grid is to call the GridControl.SortBy method. End-users can sort data by a column using a menu that appears when they touch and hold this column, or by tapping a column header.

To clear sorting applied to grid data, call the GridControl.ClearSorting method.

See Also