Skip to main content
Tab

GridDataColumnSettings.AllowSort Property

Specifies whether a user can sort data by column (or row for ASPxVerticalGrid) values.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(DefaultBoolean.Default)]
public DefaultBoolean AllowSort { get; set; }

Property Value

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

Remarks

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:

Online Demos

Run Demo: ASPxGridView - Sort Data

Run Demo: ASPxCardView - Sorting

Run Demo: ASPxVerticalGrid - Sorting

See Also