The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

ColumnCollection.CollapseGroups(Int32) Method

Collapses all column groups starting from the specified level.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

void CollapseGroups(
    int level
)
Sub CollapseGroups(
    level As Integer
)
void CollapseGroups(
    int level
)
Sub CollapseGroups(
    level As Integer
)
void CollapseGroups(
    int level
)
Sub CollapseGroups(
    level As Integer
)

Parameters

Name Type Description
level Int32

A Int32 value that specifies the grouping level starting from which column groups should be collapsed.

Parameters

Name Type Description
level Int32

A Int32 value that specifies the grouping level starting from which column groups should be collapsed.

Parameters

Name Type Description
level Int32

A Int32 value that specifies the grouping level starting from which column groups should be collapsed.

Remarks

If a worksheet has multiple grouping levels, you can use the CollapseGroups method to collapse column groups starting at the specified and subsequent levels. For example, the following code collapses all the groups except the first level:


worksheet.Columns.CollapseGroups(2);

Spreadsheet_CollapseColumnGroups

If the level parameter is less than or equal to 1, the CollapseGroups method collapses all the column groups. You can also collapse all column groups in a worksheet using the ColumnCollection.CollapseAllGroups methods.

If the level parameter is greater than the maximum grouping level specified in a worksheet, the CollapseGroups method expands all the column groups. Another way to expand all column groups in a worksheet at once is to call the ColumnCollection.ExpandAllGroups method.

Refer to the Data Grouping article to learn more on how to group data in a worksheet and specify group settings.

See Also