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

PivotGridFieldOptions.AllowSort Property

Gets or sets whether an end-user can modify the field’s current sort order.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v19.1.Core.dll

Declaration

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

Property Value

Type Default Description
DefaultBoolean **Default**

A DefaultBoolean enumeration value specifying whether end-users can modify the field’s sort order.

Available values:

Name Description
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

Property Paths

You can access this nested property as listed below:

Library Object Type Path to AllowSort
Cross-Platform Class Library PivotGridFieldBase
.Options.AllowSort
WinForms Controls PivotGridField
.Options.AllowSort
Reporting XRPivotGridField
.Options.AllowSort
ASP.NET Web Forms Controls PivotGridField
.Options.AllowSort
MVCxPivotGridField
.Options.AllowSort

Remarks

Data within the PivotGrid control is always sorted against the fields displayed within the Column Header Area and Row Header Area. An end-user can click a field’s header to toggle the sort order.

Use the PivotGridFieldBase.SortOrder property to specify the field’s sort order. The AllowSort property lets you prevent end-users from modifying the field’s current sort order. In this case, a click on the field’s header has no effect.

If the AllowSort property is set to DefaultBoolean.Default the ability to modify the field’s sort order is determined by the control’s PivotGridOptionsCustomization.AllowSort property.

Set the AllowSort property to DefaultBoolean.False to prevent an end-user from modifying the field’s sort order.

If the AllowSort property is set to DefaultBoolean.True an end-user can toggle the field’s sort order regardless of the PivotGridOptionsCustomization.AllowSort property’s value.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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