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

ASPxGridBehaviorSettings.AllowSort Property

Gets or sets whether grid data can be sorted.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

[DefaultValue(true)]
public bool AllowSort { get; set; }

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:

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

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.

See Also