ASPxGridBehaviorSettings.AllowSort Property
Gets or sets whether grid data can be sorted.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v19.1.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | **true** | true, to enable data sorting; otherwise, false. |
Property Paths
You can access this nested property as listed below:
Library | Object Type | Path to AllowSort |
---|---|---|
ASP.NET Controls and MVC Extensions | ASPxCardView |
|
ASPxGridView |
|
|
ASPxVerticalGrid |
|
|
GridViewProperties |
|
|
CardViewSettings |
|
|
CardViewSettings<CardType> |
|
|
GridViewSettings |
|
|
GridViewSettings<RowType> |
|
|
MVCxCardView |
|
|
MVCxGridView |
|
|
MVCxGridViewProperties |
|
|
MVCxVerticalGrid |
|
|
VerticalGridSettings |
|
|
VerticalGridSettings<ColumnType> |
|
|
ASP.NET Bootstrap Controls | BootstrapCardView |
|
BootstrapGridView |
|
Remarks
Use the AllowSort property to specify whether end users can sort data. You can use the GridDataColumnSettings.AllowSort property to allow or prohibit end users from sorting a particular column.
Note
End users cannot group grid data if the sorting is disabled.
Example
ASPxGridView:
<dx:ASPxGridView ID="grid">
<SettingsBehavior AllowSort="true">
<Columns>
<dx:GridViewDataColumn FieldName="ContactName" SortIndex="2" SortOrder="Ascending" >
<Settings AllowSort="false" SortMode="DisplayText" />
</dx:GridViewDataColumn>
...
</Columns>
</dx:ASPxGridView>
Concepts
ASPxGridView:
ASPxCardView:
ASPxVerticalGrid:
Online Demos
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowSort property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.