Skip to main content

PivotGridField.GetUniqueValues() Method

Returns an array of the unique values which are stored in the underlying data source in the current field.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v23.2.dll

NuGet Package: DevExpress.Wpf.PivotGrid

Declaration

public object[] GetUniqueValues()

Returns

Type Description
Object[]

An array containing the unique values in the current field.

Remarks

This method traverses through the rows in the underlying data source and fetches unique values in the corresponding field. This field is identified by the PivotGridField.FieldName property. The method’s result is an array of the unique values.

For instance, you can use the GetUniqueValues method to get an array of all the values and then apply filtering using these values (select which ones should or shouldn’t be displayed). To apply filter criteria use the PivotGridField.FilterValues collection.

Note

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

See Also