PivotGridExtension.CreateSummaryDataSource(PivotGridSettings, Object) Method
Returns the PivotGrid’s summary datasource.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
public static PivotSummaryDataSource CreateSummaryDataSource(
PivotGridSettings pivotGridSettings,
object dataSource
)
Parameters
Name | Type | Description |
---|---|---|
pivotGridSettings | PivotGridSettings | A PivotGridSettings object that contains PivotGrid settings. |
dataSource | Object | A PivotGrid data source. |
Returns
Type | Description |
---|---|
PivotSummaryDataSource | A PivotSummaryDataSource object that is the summary datasource. |
Remarks
A summary datasource is a table whose columns are represented by the fields, while the records are represented by the pivot grid rows.
In the example below, the CreateSummaryDataSource method is used in the GridView’s controller to create a summary datasource which is then displayed within the GridView extension:
object dataObject = PivotGridExtension.CreateSummaryDataSource(pivotGridSettings, dataSource);
return PartialView("GridViewPartial", dataObject);
The image below shows the result:
See Also