Skip to main content

PivotGridControl.ExpandAllAsync() Method

Expands all columns and rows in the Pivot Grid control asynchronously.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v23.2.dll

NuGet Package: DevExpress.Win.PivotGrid


public Task<bool> ExpandAllAsync()


Type Description

An asynchronous operation that returns true in case of success.


The ExpandAllAsync method is asynchronous. ExpandAllAsync starts to execute the related operation in a background thread, and returns the Pivot Grid control. The main UI thread remains unblocked to allow the application to continue responding to user actions. Refer to the following topic for more information: Asynchronous Mode.

To collapse or expand all columns and rows synchronously, use the PivotGridControl.CollapseAll and PivotGridControl.ExpandAll methods, respectively.

You can specify whether a user can expand or collapse field values in the UI. For this, use the PivotGridFieldOptions.AllowExpand property.


The following code snippet expands all Pivot Grid columns and rows asynchronously:

using DevExpress.XtraPivotGrid;
using System.Windows.Forms;

namespace WindowsFormsApp2 {
    public partial class Form1 : Form {
        public Form1() {
            pivotGridControl1.OptionsBehavior.UseAsyncMode = true;
        async void ConfigureLayout() {
          await pivotGridControl1.ExpandAllAsync();
See Also