Skip to main content

PivotCustomDrawCellBaseEventArgs.CreateDrillDownDataSource() Method

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

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.2.dll

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 following sample pivot grid:

CreateDrillDownDataSource_ex

In this example, the value in the top-leftmost cell ($1,422.00) is calculated against the ‘Product Sales’ field for a subset of the records which have:

  • the value ‘Beverages’ in the ‘Category Name’ field
  • the value ‘Chai’ in the ‘Product Name’ field
  • 1994 in the ‘Shipped Year’ field

The value at the intersection of the first column and third row ($4,154.96) is calculated for the records which have:

  • the ‘Beverages’ value in the ‘Category Name’ field
  • 1994 in the ‘Shipped Year’ field.

Note

In OLAP mode, this method equals to the PivotCustomDrawCellBaseEventArgs.CreateOLAPDrillDownDataSource method with the customColumns parameter set to null.

Important

Do not call the CreateDrillDownDataSource method in an asynchronous operation, otherwise an exception occurs. To determine whether the operation is in progress, use the pivot grid’s IThreadSafeAccessible.IsAsyncInProgress property. For more information, refer to the Asynchronous Mode document.

See Also