Back to Devexpress

DxPivotGridDataProvider<T>.Create<TDataSource>(Task<TDataSource>) Method

blazor-devexpress-dot-blazor-dot-dxpivotgriddataprovider-1-dot-create-1-x28-system-dot-threading-dot-tasks-dot-task-0-x29.md

latest2.0 KB
Original Source

DxPivotGridDataProvider<T>.Create<TDataSource>(Task<TDataSource>) Method

Creates a new DxPivotGridDataProvider<T> instance based on the specified settings.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public static DxPivotGridDataProvider<T> Create<TDataSource>(
    Task<TDataSource> data
)
    where TDataSource : IEnumerable<T>

Parameters

NameTypeDescription
dataTask<TDataSource>

An asynchronous operation that returns data for the Pivot Grid and Chart.

|

Type Parameters

NameDescription
TDataSource

The data source type.

|

Returns

TypeDescription
DxPivotGridDataProvider<T>

The created class object.

|

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 following code snippet creates a DxPivotGridDataProvider object based on the Sales.Load() method that asynchronously returns an IEnumerable<T> data source:

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

See Also

DxPivotGridDataProvider<T> Class

DxPivotGridDataProvider<T> Members

DevExpress.Blazor Namespace