Skip to main content
A newer version of this page is available. .

PivotCustomDrawCellBaseEventArgs.CreateDrillDownDataSource() Method

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

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v18.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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateDrillDownDataSource() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also