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.v21.2.Core.dll

NuGet Package: DevExpress.PivotGrid.Core

Declaration

[DefaultValue(DefaultBoolean.Default)]
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

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.

Property Paths

You can access this nested property as listed below:

Object Type Path to AllowSort
PivotGridFieldBase
.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.

See Also