DxDataGrid<T>.AllowSort Property

Specifies whether users can sort grid data.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
[DefaultValue(true)]
public bool AllowSort { get; set; }

Property Value

Type Default Description
Boolean

true

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

Remarks

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

Set the AllowSort property to false to disable data sorting in the entire grid.

<DxDataGrid Data="@forecasts" AllowSort="false" >
    ...
</DxDataGrid>

To disable sorting by individual columns, use a column’s AllowSort property.

NOTE

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

Online Demo

Data Grid - Sort Data

See Also