Skip to main content
A newer version of this page is available. .
Tab

GridDataColumnSettings.AllowSort Property

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

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.2.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
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

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