Skip to main content

PivotCellEventArgsBase<TField, TData, TCustomTotal>.CreateDrillDownDataSource() Method

Returns data records used to calculate a summary value for the cell.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v24.1.Core.dll

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

Declaration

public PivotDrillDownDataSource CreateDrillDownDataSource()

Returns

Type Description
PivotDrillDownDataSource

A PivotDrillDownDataSource object that contains records used to calculate a summary value for the current cell.

Remarks

The CreateDrillDownDataSource method retrieves data source records used to calculate current cell values.

The Pivot Grid control cells display summary and total summary values. Column and row headers display criteria applied to the underlying data source to obtain a set of data records for summary calculation.

Consider the PivotGrid control in the following image.

CreateDrillDownDataSource_ex

The value in the top-leftmost cell ($1,422.00) is calculated using the ‘Product Sales’ field for a set of records that satisfy the following criteria:

  • the ‘Category Name’ field has the value ‘Beverages’
  • the ‘Product Name’ field has the value ‘Chai’
  • the ‘Shipped Year’ field has the value 2014

The value at the intersection of the first column and third row ($4,154.96) is calculated for the records that satisfy the following criteria:

  • the ‘Category Name’ field has the value ‘Beverages’
  • the ‘Shipped Year’ field has the value 2014

In server and OLAP modes, the CreateDrillDownDataSource method returns only visible fields. To get hidden field values, use the method’s overloads with the customColumns parameter which allow you to specify the columns to return.

Note

The code sample is available at the DevExpress Demo Center - WinForms Pivot Grid - Code Examples in the OLAP Drill Down module.

See Also