Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Collapse]Data Shaping
    [Collapse]Summarization
     [Collapse]Summaries
       Summaries Overview
       Automatic Summaries
       Custom Summaries
      [Expand]Summary Display Modes
       Accessing Cell Values
       Obtaining Underlying Data (Drill-Down)
     [Expand]Totals
      Aggregation Levels
     Grouping
    [Expand]Sorting
    [Expand]Filtering
    [Expand]Editing
     Data Formatting
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]Design-time Features
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Examples
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Obtaining Underlying Data (Drill-Down)

Each cell displays a summary calculated against a data field for a subset of records in 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 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

How would you rate this topic?​​​​​​​