Skip to main content

DxDataGrid<T>.AllowSort Property

Specifies whether users can sort grid data.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll


public bool AllowSort { get; set; }

Property Value

Type Default Description


true to allow users to sort grid data; otherwise, false.



The Data Grid was moved to maintenance support mode. No new features/capabilities will be added to this component. We recommend that you migrate to the Grid component.

Users can click a column header to sort grid data by this column. To change the sort order, users should click the column header once again. To sort grid data by multiple columns, users should click column headers with the Shift key pressed.

DataGrid Sort

The AllowSort property affects the entire grid. If AllowSort is set to false, it disables sorting for all columns that have their AllowSort property set to null.

<DxDataGrid Data="@Data" AllowSort="false" >
  @* ... *@

To override this setting for an individual column, specify the column’s AllowSort property.


You can use the column’s SortIndex property to sort data in code regardless of the AllowSort property value.

Run Demo: Data Grid - Sort Data

See Also