Skip to main content

DxPivotGridDataProvider<T>.PivotGridDataSource Property

Returns the data source in the format applicable to the DxPivotGrid<T> component.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v25.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public IEnumerable<T> PivotGridDataSource { get; }

Property Value

Type Description
IEnumerable<T>

A Pivot Grid’s data source.

Remarks

Important

The Pivot Grid was moved to maintenance support mode. No new features/capabilities will be added to this component. We recommend that you migrate to the Pivot Table component.

The DxPivotGridDataProvider<T> class allows you to link the Chart and Pivot Grid components. Set the Pivot Grid’s Data property to the provider’s PivotGridDataSource property value.

<DxPivotGrid Data="@(PivotGridDataProvider.PivotGridDataSource)">
    <DxPivotGridField Field="@nameof(SaleInfo.Region)" SortOrder="PivotGridSortOrder.Ascending"
        Area="PivotGridFieldArea.Row"></DxPivotGridField>
    <DxPivotGridField Field="@nameof(SaleInfo.Country)" Area="PivotGridFieldArea.Row"></DxPivotGridField>
    <DxPivotGridField Field="@nameof(SaleInfo.City)" Area="PivotGridFieldArea.Row"></DxPivotGridField>
    <DxPivotGridField Field="@nameof(SaleInfo.Date)" GroupInterval="PivotGridGroupInterval.Year"
        Area="PivotGridFieldArea.Column" Caption="Year"> </DxPivotGridField>
    <DxPivotGridField Field="@nameof(SaleInfo.OrderId)" Caption="Count" Area="PivotGridFieldArea.Data"
        SummaryType="PivotGridSummaryType.Count"> </DxPivotGridField>
</DxPivotGrid>
...

@code {
    DxPivotGridDataProvider<SaleInfo> PivotGridDataProvider = DxPivotGridDataProvider<SaleInfo>.Create(Sales.Load());
}
See Also