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

PivotGroupFilterValues.Contains(Object, Object[]) Method

Returns whether the current filter condition allows processing the specified group value.

Namespace: DevExpress.XtraPivotGrid

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

Declaration

public bool? Contains(
    object value,
    object[] parentValues
)

Parameters

Name Type Description
value Object

The field value.

parentValues Object[]

Parent values of the field value specified by the value parameter.

Returns

Type Description
Nullable<Boolean>

true if the current filter condition allows processing the specified group value with all its child values; null (Nothing in Visual Basic) if some of the child values are processed, while others are not; false if the specified group value is not processed.

Remarks

Consider a field group that contains three fields - Year, Quarter and Month - and whose filter condition is set as shown in the image below:

pivotgrid_GroupFilterMode_GroupFilterDropdown

The following table demonstrates how to use the Contains method to determine whether a particular group value is processed according to the filter condition.

Group Value C# Visual Basic Return Value
1994 filterValues.Contains(1994, null); FilterValues.Contains(1994, Nothing) null (Nothing in Visual Basic)
1995 filterValues.Contains(1995, null); FilterValues.Contains(1995, Nothing) true
Quarter 3 1994 filterValues.Contains(3, new object[] {1994}); FilterValues.Contains(3, New Object() {1994})
Quarter 4 1994 filterValues.Contains(4, new object[] {1994}); FilterValues.Contains(4, New Object() {1994})
Quarter 1 1995 filterValues.Contains(1, new object[] {1995}); FilterValues.Contains(1, New Object() {1995})
August Quarter 3 1994 filterValues.Contains(8, new object[] {1994, 3});
September Quarter 3 1994 filterValues.Contains(9, new object[] {1994, 3});

To obtain a filter value by the corresponding group value, use the PivotGroupFilterValues.FindFilterValue method.

See Also