PivotFieldList

RadPivotFieldList is an integral part of RadPivotGrid. It gives the users the power to modify RadPivotGrid and generate many different reports with the current data.

Rad Pivot Field List Getting Started 01

The control provides the following key features:

  • Automatically change RadPivotGrid generated report when the "Defer Layout Update" is unchecked.

  • Using CheckBoxes to mark the data you want to include in the RadPivotGrid.

  • Using RadContextMenu to apply modifications on RadPivotGrid runtime:

    • Sorting ascending and descending

    • Apply Number Format from the predefined formats or create your own

    • Change currently used Aggregate function

    • Applying different filters - Label, Value, Top10 filter

    • Using different Calculations for GrandTotals

    • Using percent of GrandTotal instead showing the whole number.

We will now demonstrate how to integrate RadPivotFieldList with RadPivotGrid. We will extend our project from the Getting Started article for RadPivotGrid.

Adding RadPivotFieldList

RadPivotFieldList can be used after adding reference to the following assemblies:

  • Telerik.Windows.Controls
  • Telerik.Windows.Controls.PivotFieldList
  • Telerik.Windows.Controls.Navigation
  • Telerik.Windows.Controls.Input
  • Telerik.Windows.Controls.Pivot
  • Telerik.Pivot.Core
  • System.Runtime.Serialization

You can add your RadPivotFieldList directly in the XAML. First step is to define pivot namespace: xmlns:pivot="http://schemas.telerik.com/2008/xaml/presentation/pivot". After that add the code below:

<pivot:RadPivotFieldList Name="radPivotFieldList1" Grid.Column="1" /> 
Now the only thing you have to set is the DataProvider:

<pivot:RadPivotFieldList Name="radPivotFieldList1" Grid.Column="1"  DataProvider="{StaticResource LocalDataProvider}"/> 
Here's the result of the modified application from Getting Started article: Rad Pivot Grid Rad Field List Getting Started 01

Now by using RadPivotFieldList you are able to modify RadPivotGrid at runtime and to generate reports with entire new structure and information. For example, you can transpose the grid by switching the rows and columns of the field list: Rad Pivot Grid Rad Field List Getting Started 02

The OlapDataProviders (XmlaDataProvider) have a default distinct values limit of 1000 records. This is why if you have more distinct values in your database you won't see them all in the pivot field list control. To alter this number, set the DistinctValuesLimit property of the provider.

See Also

In this article