Back to Devexpress

PivotGridControl.CreateDrillDownDataSource() Method

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-189f2b0d.md

latest4.4 KB
Original Source

PivotGridControl.CreateDrillDownDataSource() Method

Returns data records used to calculate summary values for all cells.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public PivotDrillDownDataSource CreateDrillDownDataSource()
vb
Public Function CreateDrillDownDataSource As PivotDrillDownDataSource

Returns

TypeDescription
PivotDrillDownDataSource

A PivotDrillDownDataSource object containing the underlying data records.

|

Remarks

Note

For an example of use refer to the CreateDrillDownDataSource(Int32, Int32, Int32, List<String>) topic.

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

This method obtains data for all cells. To obtain underlying data for a particular cell, use the CreateDrillDownDataSource method overloads with the columnIndex and rowIndex parameters.

If you use the CreateDrillDownDataSource method in OLAP mode, take note of the following limitations:

OLAP ServerNote
MS SQL Server Analysis Services 2000The customColumns parameter is ignored and the CreateDrillDownDataSource method returns the granularity attributes.
MS SQL Server Analysis Services 2005 and 2008If the customColumns list is null or empty, the CreateDrillDownDataSource method returns the columns related to the current column, row and data PivotGrid fields. The method also returns filter fields, if any.
Any OLAP ServerIf returned records contain a column used as a filter in Pivot Grid, the returned data are filtered.
Any OLAP ServerThe CreateDrillDownDataSource is not applicable for fields which are calculated measures.
MS SQL Server Analysis Services - all versionsMultiple filter items selected in a Filter field results in an exception.

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.

winforms-pivotgrid-how-to-display-underlying-data/CS/DrillDownDataSourceExample/Form1.cs#L73

csharp
{
    PivotDrillDownDataSource drillDownDataSource = pivotGridControl1.CreateDrillDownDataSource();
    Form dataform = CreateDrillDownForm(drillDownDataSource);

winforms-pivotgrid-how-to-display-underlying-data/VB/DrillDownDataSourceExample/Form1.vb#L69

vb
Private Sub btnGrandTotal_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnGrandTotal.Click
    Dim drillDownDataSource As PivotDrillDownDataSource = pivotGridControl1.CreateDrillDownDataSource()
    Dim dataform As Form = CreateDrillDownForm(drillDownDataSource)

See Also

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace