[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Collapse]Data Shaping
       Summaries Overview
       Automatic Summaries
       Custom Summaries
      [Expand]Summary Display Modes
       Accessing Cell Values
       Obtaining Underlying Data (Drill-Down)
      Aggregation Levels
     Data Formatting
   [Expand]Data Analysis
   [Expand]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Design-Time Features
   [Expand]UI Elements
   [Expand]End-User Capabilities
  [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Obtaining Underlying Data (Drill-Down)

Each Cell displays a summary calculated against a Data Field for a subset of records in the PivotGrid's underlying data source. All records from this subset have matching values in a Column Field(s) and Row Field(s), and these values are identified by column and row headers. To get the underlying records for a particular cell, use the PivotGridControl.CreateDrillDownDataSource method.

Consider the following PivotGridControl.

For the top-leftmost cell ($1,500.00), the CreateDrillDownDataSource method will return records from the PivotGrid data source that have:

  • the value "Bon app'" in the 'Customer' field;
  • the value "Carnarvon Tigers" in the 'Product Name' field;
  • the 1995 value in the 'Order Year' field.

For the cell ($2,435.00) at the intersection of the first column and the fourth row, the CreateDrillDownDataSource method will return records that have:

  • the value "Bon app'" in the 'Customer' field;
  • the 1995 value in the 'Order Year' field.

To get information on how to access the CreateDrillDownDataSource method, refer to the Member Table: Get Underlying Data topic.

Expanded Example: How to Display Underlying Records

The following example shows how to display the records from the control's underlying data source which correspond to a particular cell. A new form that displays these records is opened when a particular cell in the PivotGrid control is double-clicked.

In the example the PivotGridControl.CellDoubleClick event is handled. The PivotCellEventArgsBase<TField, TData, TCustomTotal>.CreateDrillDownDataSource (see PivotCellEventArgsBase<TField, TData, TCustomTotal>.CreateDrillDownDataSource) method is called to obtain the list of records associated with the clicked cell.

The following image shows a sample PivotGrid control which is bound to the Invoices table in the nwind.mdb database:

Clicking the third cell in the 1994 column will invoke the following form:

It lists all the orders made in 1994 by Belgian customers.

Expanded See Also

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