PivotGroupFilterValues.Contains(Object, Object[]) Method

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

Namespace: DevExpress.XtraPivotGrid

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


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


Name Type Description
value Object

The field value.

parentValues Object[]

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


Type Description

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.


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


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}) null (Nothing in Visual Basic)
Quarter 4 | 1994 filterValues.Contains(4, new object[] {1994}); FilterValues.Contains(4, New Object() {1994}) false
Quarter 1 | 1995 filterValues.Contains(1, new object[] {1995}); FilterValues.Contains(1, New Object() {1995}) true
August | Quarter 3 | 1994 filterValues.Contains(8, new object[] {1994, 3}); FilterValues.Contains(8, New Object() {1994, 3}) false
September | Quarter 3 | 1994 filterValues.Contains(9, new object[] {1994, 3}); FilterValues.Contains(9, New Object() {1994, 3}) true

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

See Also