Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]MVVM Enhancements
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Collapse]Examples
    [Collapse]Binding to Data
      How to: Bind a PivotGrid to an MS Access Database
      How to: Bind a PivotGrid to an MS Access Database Programmatically
      How to: Bind a Pivot Grid to an OLAP datasource
      How to: Bind a PivotGrid to an OLAP Cube Using the OLE DB Data Provider
      How to: Bind a PivotGrid to an OLAP Cube Using the ADOMD.NET Data Provider
      How to: Bind a PivotGrid to an OLAP Cube via XMLA
      How to: Display Unbound Data in a PivotGrid Control
      How to: Work with a PivotGrid Control Offline
      How to: Format Cell Values
      How to: Obtain Underlying Data (Drill-Down)
      How to: Bind the Pivot Grid to Fields and Groups specified in ViewModel
    [Expand]Grouping, Filtering and Summarizing
    [Expand]Appearance
    [Expand]Miscellaneous
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Display Unbound Data in a PivotGrid Control

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E2122.

This example shows how to add an unbound field to the PivotGridControl, to represent the total sum of an order.

Here the PivotGridControl is bound to the Order Details data table (from the nwind sample database), which contains UnitPrice, Quantity and Discount fields; there is no field which represents the total sum. However this can be manually calculated as follows: UnitPrice*Quantity*(1-Discount).

To solve this task, create a PivotGrid's field and set its PivotGridField.UnboundType property to FieldUnboundColumnType.Decimal. Then, handle the PivotGridControl.CustomUnboundFieldData event and manually populate the field with data.

Is this topic helpful?​​​​​​​