PivotGridFieldBase.TopValueShowOthers Property

Gets or sets whether the "Others" item is displayed within the Pivot Grid when the Top X Value feature is enabled.

Namespace: DevExpress.XtraPivotGrid

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

Declaration

[DefaultValue(false)]
public bool TopValueShowOthers { get; set; }
<DefaultValue(False)>
Public Property TopValueShowOthers As Boolean

Property Value

Type Default Description
Boolean

false

true if the "Others" item is displayed when the Top X Value feature is enabled; otherwise, false.

Remarks

The PivotGridFieldBase.TopValueCount property can be used to restrict the number of field values displayed along the control's left or top edge. Setting this property to a positive value enables the Top X Value feature. In this case, the control displays the first field values according to the current sort order, the number of these values is defined by the TopValueCount property. If the TopValueShowOthers property is set to false the values that follow the first values are hidden. If this property is set to true the remaining values will be combined into a single item ("Others").

The following image shows a sample XtraPivotGrid control which displays all the field values for the 'Sales Person' field:

PivotGridField.TopValueShowOthers1

In the next image the same control is displayed. It's TopValueCount property is set to 5 (the top 5 values are displayed) and the TopValueShowOthers property is set to true:

PivotGridField.TopValueShowOthers2

To replace the default text ("Others") with a custom string you can create a descendant of the DevExpress.XtraPivotGrid.Localization.PivotGridLocalizer class and override its GetLocalizedString method. An instance of the custom Localizer object should be assigned to the static DevExpress.XtraPivotGrid.Localization.PivotGridLocalizer.Active property.

Another way to customize the "Others" header is to handle the PivotGridControl.FieldValueDisplayText event.

NOTE

The Others field value is not supported in an OLAP mode.

See Also