Skip to main content

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.v22.2.Core.dll

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Dashboard.Design


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.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetUniqueValues() method.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also