aspnet-devexpress-dot-web-dot-griddatacolumnsettings.md
Specifies whether a user can sort data by column (or row for ASPxVerticalGrid) values.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(DefaultBoolean.Default)]
public DefaultBoolean AllowSort { get; set; }
<DefaultValue(DefaultBoolean.Default)>
Public Property AllowSort As DefaultBoolean
| Type | Default | Description |
|---|---|---|
| DefaultBoolean | Default |
True to enable sorting. False to disable sorting. Default to control the column’s behavior at the control level (the ASPxGridBehaviorSettings.AllowSort property).
|
Available values:
| Name | Description | Return Value |
|---|---|---|
| True |
The value is true.
|
0
| | False |
The value is false.
|
1
| | Default |
The value is specified by a global option or a higher-level object.
|
2
|
Specify the AllowSort property to control sorting at the column level.
If the column’s AllowSort property is set to Default, the control determines the column’s behavior at the control level, based on the ASPxGridBehaviorSettings.AllowSort property value.
<dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="false">
<SettingsBehavior AllowSort="true">
<Columns>
<dx:GridViewDataColumn FieldName="ContactName" SortIndex="2" SortOrder="Ascending" >
<Settings AllowSort="false"/>
</dx:GridViewDataColumn>
<%--...--%>
</Columns>
</dx:ASPxGridView>
For more information on the sort mode in a particular control, refer to the following topics:
Run Demo: ASPxGridView - Sort Data
Run Demo: ASPxCardView - Sorting
Run Demo: ASPxVerticalGrid - Sorting
See Also