Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.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