Back to Devexpress

PivotGridGroup.GetUniqueValues(Object[]) Method

corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotgridgroup-dot-getuniquevalues-x28-system-dot-object-x29.md

latest3.3 KB
Original Source

PivotGridGroup.GetUniqueValues(Object[]) Method

Returns the unique child values of the specified group value.

Namespace : DevExpress.XtraPivotGrid

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

NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

Declaration

csharp
public List<object> GetUniqueValues(
    object[] parentValues
)
vb
Public Function GetUniqueValues(
    parentValues As Object()
) As List(Of Object)

Parameters

NameTypeDescription
parentValuesObject[]

An array of objects that identifies the group value.

|

Returns

TypeDescription
List<Object>

A collection of the group value‘s child values.

|

Remarks

The GetUniqueValues method searches for the data source records which contain parentValues values in the corresponding fields, and returns the collection of unique values contained in the child field in the records.

In the PivotGrid control shown below, calling the GetUniqueValues method returns the following collections:

parentValues arrayReturn collection
1994, Quarter 3August, September
1994, Quarter 4October, November, December
1994Quarter 3, Quarter 4

The following code obtains the unique child values of the ‘1994 - Quarter 4’ group value:

csharp
List<object> uniqueChildValues = 
     pivotGridControl1.Groups[0].GetUniqueValues(new object[] {1994, 4});
vb
Dim uniqueChildValues As List(Of Object) = _
     pivotGridControl1.Groups(0).GetUniqueValues(New Object() {1994, 4})

Note

If the PivotGridControl filters data by OLAP member unique names (controlled by the PivotGridFieldOptions.OLAPFilterByUniqueName and PivotGridOptionsOLAP.FilterByUniqueName options), the GetUniqueValues method returns them instead of field values.

See Also

PivotGridGroup Class

PivotGridGroup Members

DevExpress.XtraPivotGrid Namespace