PivotDashboardItem Class

A Pivot dashboard item that displays cross-tabular reports.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v20.2.Core.dll


public class PivotDashboardItem :


The Pivot dashboard item presents data using cross-tabular reports.


The following documentation is available.


The following example demonstrates how to bind a Pivot dashboard item to data in code.

View Example

using System;
using System.Windows.Forms;
using DevExpress.DashboardCommon;
using DevExpress.DataAccess;

namespace Dashboard_CreatePivot {
    public partial class Form1 : Form {
        public Form1() {
        private PivotDashboardItem CreatePivot(DashboardObjectDataSource dataSource) {

            // Creates a pivot dashboard item and specifies its data source.
            PivotDashboardItem pivot = new PivotDashboardItem();
            pivot.DataSource = dataSource;

            // Specifies dimensions that provide pivot column and row headers.
            pivot.Columns.AddRange(new Dimension("Country"), new Dimension("Sales Person"));
            pivot.Rows.AddRange(new Dimension("CategoryName"), new Dimension("ProductName"));

            // Specifies measures whose data is used to calculate pivot cell values.
            pivot.Values.AddRange(new Measure("Extended Price"), new Measure("Quantity"));

            // Specifies the default expanded state of pivot column field values.
            pivot.AutoExpandColumnGroups = true;

            return pivot;
        private void Form1_Load(object sender, EventArgs e) {

            // Creates a dashboard and sets it as the currently opened dashboad in the dashboard viewer.
            dashboardViewer1.Dashboard = new Dashboard();

            // Creates a data source and adds it to the dashboard data source collection.
            DashboardObjectDataSource dataSource = new DashboardObjectDataSource();
            dataSource.DataSource = (new nwindDataSetTableAdapters.SalesPersonTableAdapter()).GetData();

            // Creates a pivot dashboard item with the specified data source 
            // and adds it to the Items collection, to display it within the dashboard.
            PivotDashboardItem pivot = CreatePivot(dataSource);

            // Reloads data in the data sources.


See Also