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

PivotGridOptionsFilterBase.ShowOnlyAvailableItems Property

Gets or sets whether filter items that cannot be displayed because of filtering applied to other fields should be hidden.

Namespace: DevExpress.XtraPivotGrid

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

Declaration

[DefaultValue(false)]
public bool ShowOnlyAvailableItems { get; set; }

Property Value

Type Default Description
Boolean **false**

true to hide filter items that cannot be displayed because of filtering applied to other fields; otherwise, false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to ShowOnlyAvailableItems
WinForms Controls PivotGridControl
.OptionsFilterPopup.ShowOnlyAvailableItems
ASP.NET Controls and MVC Extensions ASPxPivotGrid
.OptionsFilter.ShowOnlyAvailableItems
MVCxPivotGrid
.OptionsFilter.ShowOnlyAvailableItems
PivotGridSettings
.OptionsFilter.ShowOnlyAvailableItems

Remarks

By default, a filter drop-down window invoked for a particular field contains all the unique field values, although some of these values may actually be excluded from the pivot grid by filtering applied to other fields.

Assume that a pivot grid contains two dimension fields: Category Name and Product Name.

ShowOnlyAvailableItems_PivotGrid

If you choose only one product category from the Category Name filter drop-down, all products related to other categories will be excluded from the pivot grid. This means that whether you check or uncheck any of these products in the Product Name filter drop-down, this will have no effect, since they are hidden by the category filtering.

PivotGridControl allows you to remove such field values from filter drop-downs. To do this, set the ShowOnlyAvailableItems property to true.

The image below illustrates the property effect:

ShowOnlyAvailableFilterItems

End-users can enable or disable the ShowOnlyAvailableItems option via the Toolbar_ShowOnlyAvailableItems toolbar button.

You can also obtain a list of available field values in code, using the PivotGridFieldBase.GetAvailableValues method.

Note

This property is not in effect when the PivotGridFieldBase.GroupFilterMode property is set to PivotGroupFilterMode.Tree.

See Also