Skip to main content

PivotGridControl.SetDataSourceAsync(Object) Method

Sets a data source for PivotGridControl and loads data asynchronously.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v24.1.dll

NuGet Package: DevExpress.Wpf.PivotGrid

Declaration

public Task<bool> SetDataSourceAsync(
    object dataSource
)

Parameters

Name Type Description
dataSource Object

An object that contains data for the PivotGridControl.

Returns

Type Description
Task<Boolean>

An asynchronous operation that returns true in case of success.

Remarks

The SetDataSourceAsync method is asynchronous. It starts executing the related operation in a background thread, and immediately returns control. The primary UI thread is not blocked, allowing the application to continue responding to end-user actions. For more information about the asynchronous mode, see Asynchronous Mode.

If you need to perform specific actions after this operation is completed, use another overload of the SetDataSourceAsync method that takes the asyncCompleted parameter, and pass a delegate that performs the required actions as this parameter.

To retrieve data from a data source synchronously, assign it using the PivotGridControl.DataSource property.

To learn more about data binding, see Binding to Data and PivotGridControl.DataSource.

See Also