Back to Devexpress

PivotGridControl.CreateSummaryDataSource() Method

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-6df741cd.md

latest2.5 KB
Original Source

PivotGridControl.CreateSummaryDataSource() Method

Returns a summary data source.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public PivotSummaryDataSource CreateSummaryDataSource()
vb
Public Function CreateSummaryDataSource As PivotSummaryDataSource

Returns

TypeDescription
PivotSummaryDataSource

A PivotSummaryDataSource object that represents the summary data source.

|

Remarks

A summary data source is a table whose columns correspond to the fields, while the records correspond to the pivot grid data cells.

In the example below, the CreateSummaryDataSource method is used to create a summary data source which is then assigned to the Grid Control.

csharp
DevExpress.XtraPivotGrid.PivotSummaryDataSource ds = pivotGridControl1.CreateSummaryDataSource();
gridControl1.DataSource = ds;
vb
Dim ds As DevExpress.XtraPivotGrid.PivotSummaryDataSource = pivotGridControl1.CreateSummaryDataSource()
GridControl1.DataSource = ds

The image below shows the result:

To identify a column in a summary data source that corresponds to an unbound field, specify its name using the PivotGridFieldBase.UnboundFieldName property. An unbound field is not connected to a datasource field and it should be populated with data manually via the PivotGridControl.CustomUnboundFieldData event.

See Also

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace