Back to Devexpress

DataGridView.SortMode Property

maui-devexpress-dot-maui-dot-datagrid-dot-datagridview-84fca800.md

latest1.8 KB
Original Source

DataGridView.SortMode Property

Gets or sets whether the grid allows data sorting by multiple columns or by a single column only. This is a bindable property.

Namespace : DevExpress.Maui.DataGrid

Assembly : DevExpress.Maui.DataGrid.dll

NuGet Package : DevExpress.Maui.DataGrid

Declaration

csharp
public GridSortMode SortMode { get; set; }

Property Value

TypeDefaultDescription
GridSortModeSingle

A GridSortMode enumeration value.

|

Available values:

NameDescription
Single

Grid data can be sorted only by a single column at a time.

| | Multiple |

Grid data can be sorted by multiple columns.

|

Remarks

To control whether sorting is available for users, use the DataGridView.AllowSort or GridColumn.AllowSort property.

Refer to the following topic for more information about the sorting functionality in the Data Grid View: How to Sort Rows in DevExpress Data Grid for .NET MAUI.

Example

The following example enables multi-column sorting in a grid:

xaml
<dxg:DataGridView SortMode="Multiple">
    <!--...-->
</dxg:DataGridView>

See Also

How to Filter Rows in DevExpress Data Grid for .NET MAUI

DataGridView Class

DataGridView Members

DevExpress.Maui.DataGrid Namespace