Back to Devexpress

DxPivotGridDataProvider<T>.PivotGridDataSource Property

blazor-devexpress-dot-blazor-dot-dxpivotgriddataprovider-1-daeb7261.md

latest2.4 KB
Original Source

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

csharp
public IEnumerable<T> PivotGridDataSource { get; }

Property Value

TypeDescription
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.

razor
<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

DxPivotGridDataProvider<T> Class

DxPivotGridDataProvider<T> Members

DevExpress.Blazor Namespace