Back to Devexpress

PivotGridWebOptionsFilter.ShowOnlyAvailableItems Property

aspnet-devexpress-dot-web-dot-aspxpivotgrid-dot-pivotgridweboptionsfilter.md

latest3.5 KB
Original Source

PivotGridWebOptionsFilter.ShowOnlyAvailableItems Property

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

Namespace : DevExpress.Web.ASPxPivotGrid

Assembly : DevExpress.Web.ASPxPivotGrid.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

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

Property Value

TypeDefaultDescription
Booleanfalse

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:

LibraryObject TypePath to ShowOnlyAvailableItems
ASP.NET MVC ExtensionsPivotGridSettings

.OptionsFilter .ShowOnlyAvailableItems

| | ASP.NET Web Forms Controls | ASPxPivotGrid |

.OptionsFilter .ShowOnlyAvailableItems

|

Remarks

The ShowOnlyAvailableItems property allows you to simulate group filter behavior without merging fields into a group. This property is not in effect when you open a filter window for grouped fields.

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.

For example, a pivot grid contains two dimension fields: Category Name and Product Name.

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

To remove such field values from filter drop-downs, set the PivotGridOptionsFilterBase.ShowOnlyAvailableItems property to true :

See Also

GetAvailableValues()

PivotGridWebOptionsFilter Class

PivotGridWebOptionsFilter Members

DevExpress.Web.ASPxPivotGrid Namespace