PivotGridFieldBase.GetUniqueValues() Method

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

Namespace: DevExpress.XtraPivotGrid

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


public object[] GetUniqueValues()


Type Description

An array containing the unique values in the current field.


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 PivotGridFieldBase.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 PivotGridFieldBase.FilterValues collection.


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