DxDataGrid<T>.AllowSort Property
Specifies whether users can sort grid data.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v22.1.dll
Declaration
[DefaultValue(true)]
[Parameter]
public bool AllowSort { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Boolean | true |
true to allow users to sort grid data; otherwise, false. |
Remarks
Important
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.
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" >
@* ... *@
</DxDataGrid>
To override this setting for an individual column, specify the column’s AllowSort property.
Note
You can use the column’s SortIndex property to sort data in code regardless of the AllowSort property value.