Version

Enabling Excel-Style Filtering (xamPivotGrid, xamPivotDataSelector)

Topic Overview

Purpose

This topic explains how to enable the Microsoft® Excel®-Style Filtering feature of the xamPivotGrid™/ xamPivotDataSelector™ controls.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic introduces the xamPivotGrid control and its key features and functionalities. xamPivotGridxamPivotGrid

This topic demonstrates how to get started with the xamPivotGrid control by providing step-by-step procedure for adding this control to a Silverlight® application.

This topic is an introduction to the xamPivotDataSelector control.

This topic explains the Excel-Style Filtering feature of the xamPivotGrid and its user functionality and interactions.

In this topic

This topic contains the following sections:

Introduction

Enabling Excel-style filtering summary

When Excel-Style Filtering in the xamPivotGrid control and the data selector is enabled, users can add custom filter conditions for the measure values and for the captions of members from the row and column hierarchies.

By default, Excel-Style Filtering in the xamPivotGrid is not enabled, so you need to explicitly enable it by setting the EnableAdvancedFiltering property to True. This property is available for both the xamPivotGrid and the XamPivotDataSelector.

Enabling Excel-Style Filtering

Property settings

The following table maps the desired configuration to property settings.

In order to: Use this property: And set it to:

Enable the Excel-Style Filtering UI in the pivot grid.

True

Enable the Excel-Style Filtering UI in the data selector.

True

Considerations

When using Excel-Style Filtering there are a few things you should keep in mind:

  • In order to enable Excel-Style Filtering, the data source set as the DataSource property of the pivot grid/data selector must implement the ISupportFilters interface. Currently this interface is implemented in the XmlaDataSource.

  • The default value of EnableAdvancedFiltering is False.

  • The EnableAdvancedFiltering property should be set before any items are added to the columns, rows, filters or measures of the pivot grid or the data selector. This means that if you want to set the property in code (rather than XAML) and there are initial items in columns, rows etc., you should set it before the pivot grid is initialized. For example, a suitable place to set the property in code is the constructor of the Page/UserControl, where the pivot grid or data selector is used. Setting the property should be after InitializeComponent() has been called.

  • Changing the value of the EnableAdvancedFiltering property at run-time does not change the existing UI filtering controls in the grid or data selector. However, all hierarchies that are added to the rows, columns, filters, or measures after that will support Excel-Style Filtering or not based on the value that was set to EnableAdvancedFiltering.