Skip to main content
All docs
V26.1
  • DxPivotTable.WaitForDataLoadAsync() Method

    Returns a task that completes when pending asynchronous data load operations are completed.

    Namespace: DevExpress.Blazor.PivotTable

    Assembly: DevExpress.Blazor.PivotTable.v26.1.dll

    Declaration

    public Task WaitForDataLoadAsync()

    Returns

    Type Description
    Task

    A task that completes when pending asynchronous data load operations are completed.

    Remarks

    When bound to a Server Mode data source, the Pivot Table component loads data asynchronously in small portions instead of loading the entire dataset. To ensure correct data operations, call WaitForDataLoadAsync before methods that read or modify Pivot Table data (GetFields) or change the component state (for example, CollapseAllColumns, LoadLayout, SetFilterCriteria):

    <!-- ... -->
    @code {
        IPivotTable PivotTable { get; set; }
        // ...
        async Task ChangeSortOrder() {
            PivotTable.BeginUpdate();  
            await PivotTable.WaitForDataLoadAsync();
            PivotTable.GetFields().First().ChangeSortOrder();
            PivotTable.EndUpdate();
        }
    }
    

    You do not need to use this method when you bind the Pivot Table to an in-memory collection (list or array).

    See Also