The WPF pivot grid control organizes and summarizes business data and displays the result in a cross-table format.
The WPF pivot grid control performs long-running operations asynchronously on a background thread. This allows end users to access other UI controls without distraction.
The control can load a large set of records on demand in a little time.
Virtual scrolling improves the performance when displaying large numbers of pivot grid cells.
The WPF Pivot Grid control simulates the pivot table feature of Excel. The data source for the control should be a DataTable, DataView, DataSet from SQL databases or collections like IEnumerable, ICollection, IList, List
The pivot table field list and group fields are automatically populated with fields from the bound data source. They later allow end users to drag fields, filter and sort them, and create a pivot report at runtime.
Drill down (expand) and drill up (collapse) to visualize the pivot information in both abstract and detailed views.
Refresh the control only on demand and not during every UI interaction.
Edit values at runtime, thereby updating the total cell simultaneously.
Update values in real time by pushing the live data and refreshing the control whenever required.
Built-in header and Excel-like filter UIs with advanced filtering options to easily filter and view data. It is also possible to filter programmatically.
A header filter allows users to filter values in an individual column.
Filter column and row headers based on label text or grand-total value.
Sorting is a process that involves arranging the rows and columns based on labels or values.
Header sorting arranges the row and column header text in the ascending or descending order.
Column sorting arranges the row and column header text based on the custom comparer defined by users.
Column sorting arranges the column values in the ascending or descending order by clicking the desired column header.
Arranges one or more columns in the ascending or descending order by holding the Ctrl key and clicking the column headers.
Define custom summaries for the pivot item values using a built-in dialog at runtime as well as programmatically. The WPF pivot grid control also supports 19 other built-in summary types.
Along with 16 built-in calculation types, there is also extensive support to insert user-defined calculated fields using a custom formula, either dynamically at runtime or programmatically.
The calculated field, otherwise known as unbound field generates a unique field with its own calculated value by executing a simple user-defined formula.
Expression field generates data by executing user-defined expressions. The generated data is specific to a few fields from the underlying data source.
Drill through is used to get a list of raw items for a particular value cell or summary cell.
Define how the column header, row header, summary cell, and value cell of the control should be displayed.
Apply specific formatting such as font, color, and border settings to a cell to meet certain criteria.
Number formatting and date formatting help transform the appearance of the actual cell value.
Users can visualize the control as a flat grid or a pivot table similar to Excel. Users can also position summaries at the top.
Allows the display of both pivot rows and columns values along with calculations.
Users can customize the pivot grid to look like a flat grid. Users can also pivot only rows and calculations.
The summary layout easily switches the summary position to either the top or bottom beside each field in the control.
Subtotals and grand totals are calculated automatically by the pivot engine inside the control and displayed in the pivot grid. This helps users make decision based on the totals. Also, users can show or hide subtotals and grand totals for rows and columns.
Users can retrieve information about a particular cell on hyperlink cell click. It also allows custom operations programmatically.
Expand/collapse operations can be handled through this context menu at the row level and column level individually.
Provides basic information about a cell when hovering the mouse pointer over it.
Easily resize each column’s width using a simple drag operation at runtime.
Users can freeze row and column headers when performing scroll operations to have a precise view of the content.
The pivot grid supports selecting entire row or column and group of cells with or without header cells. It is similar to cell selection in the Microsoft Excel.
Settings in the WPF Pivot Grid control can be serialized to an XML format and loaded back through the built-in deserialization options.
The WPF Pivot Grid control has a rich set of options available for exporting data to Excel, Word, PDF, and CSV, and printing the same. Users can also customize exporting and printing operations.
Ships with built-in themes like Blend, Office 2010, Office 2013, Office 2016, Office 365, Visual Studio 2013, Visual Studio 2015 and Metro.
Customize the appearance of the control to any extent programmatically.
Easily customize all aspects of the appearance using the theme studio utility.
For a great developer experience, flexible built-in APIs are available to define and customize the WPF pivot grid control. Developers can optimize the data bound to the control and customize the user interface (UI) completely using code with ease.
Allows users from different locales to use the control by applying date format, currency format, and number format to suit local preferences.
The text and layout of the control can be displayed in the right-to-left (RTL) direction.
Allows users to customize the text in the user interface based on the local culture.
WPF Pivot Grid is compatible with Coded UI and UFT (formerly QTP) automation tools.
Easily get started with the WPF Pivot Grid using a few simple lines of XAML, and C# code example as demonstrated below. Also explore our WPF Pivot Grid Example that shows you how to render and configure the pivot grid in WPF.
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:PivotGridControl_Demo"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
x:Class="PivotGridControl_Demo.MainWindow"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Window.Resources>
<ResourceDictionary>
<ObjectDataProvider x:Key="data" ObjectType="{x:Type local:ProductSales}" MethodName="GetSalesData" />
</ResourceDictionary>
</Window.Resources>
<Grid>
<syncfusion:PivotGridControl HorizontalAlignment="Left" Name="pivotGrid" VerticalAlignment="Top" EnableValueEditing="True" ItemSource="{Binding Source={StaticResource data}}" >
<syncfusion:PivotGridControl.PivotRows>
<syncfusion:PivotItem FieldHeader="Product" FieldMappingName="Product" TotalHeader="Total" />
<syncfusion:PivotItem FieldHeader="Date" FieldMappingName="Date" TotalHeader="Total"/>
</syncfusion:PivotGridControl.PivotRows>
<syncfusion:PivotGridControl.PivotColumns>
<syncfusion:PivotItem FieldHeader="Country" FieldMappingName="Country" TotalHeader="Total" />
<syncfusion:PivotItem FieldHeader="State" FieldMappingName="State" TotalHeader="Total"/>
</syncfusion:PivotGridControl.PivotColumns>
<syncfusion:PivotGridControl.PivotCalculations>
<syncfusion:PivotComputationInfo CalculationName = "Total" FieldName = "Amount" Format="C" SummaryType="DoubleTotalSum" />
<syncfusion:PivotComputationInfo CalculationName = "Total" FieldName = "Quantity" SummaryType="Count" />
</syncfusion:PivotGridControl.PivotCalculations>
</syncfusion:PivotGridControl>
</Grid>
</Window>
using System;
using System.Collections.Generic;
using System.Windows;
namespace PivotGridControl_Demo
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
public class ProductSales
{
public string Product
{
get;
set;
}
public string Date
{
get;
set;
}
public string Country
{
get;
set;
}
public string State
{
get;
set;
}
public int Quantity
{
get;
set;
}
public double Amount
{
get;
set;
}
public static ProductSalesCollection GetSalesData()
{
/// Geography
string[] countries = new string[] {
"Canada"
};
string[] canadaStates = new string[] {
"Alberta",
"British Columbia",
"Ontario"
};
/// Time
string[] dates = new string[] {
"FY 2005",
"FY 2006",
"FY 2007"
};
/// Products
string[] products = new string[] {
"Bike",
"Car"
};
Random r = new Random(123345345);
int numberOfRecords = 2000;
ProductSalesCollection listOfProductSales = new ProductSalesCollection();
for (int i = 0; i < numberOfRecords; i++)
{
ProductSales sales = new ProductSales();
sales.Country = countries[r.Next(0, countries.GetLength(0))];
sales.Quantity = r.Next(1, 12);
/// 1 percent discount for 1 quantity
double discount = (30000 * sales.Quantity) * (double.Parse(sales.Quantity.ToString()) / 100);
sales.Amount = (30000 * sales.Quantity) - discount;
sales.Date = dates[r.Next(r.Next(dates.GetLength(0) + 1))];
sales.Product = products[r.Next(r.Next(products.GetLength(0) + 1))];
sales.State = canadaStates[r.Next(canadaStates.GetLength(0))];
listOfProductSales.Add(sales);
}
return listOfProductSales;
}
public override string ToString()
{
return string.Format("{0}-{1}-{2}", this.Country, this.State, this.Product);
}
public class ProductSalesCollection : List<ProductSales>
{
}
}
}
Syncfusion WPF Pivot Grid provides the following:
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.
A good place to start would be our comprehensive getting started documentation.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.