Back to Devexpress

ColumnCollection.UnGroup(Int32, Int32, Boolean) Method

officefileapi-devexpress-dot-spreadsheet-dot-columncollection-dot-ungroup-x28-system-dot-int32-system-dot-int32-system-dot-boolean-x29.md

latest5.9 KB
Original Source

ColumnCollection.UnGroup(Int32, Int32, Boolean) Method

Ungroups the grouped columns on a worksheet.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
void UnGroup(
    int first,
    int last,
    bool unhideCollapsed
)
vb
Sub UnGroup(
    first As Integer,
    last As Integer,
    unhideCollapsed As Boolean
)

Parameters

NameTypeDescription
firstInt32

A zero-based integer representing the index of the first column to be ungrouped.

| | last | Int32 |

A zero-based integer representing the index of the last column to be ungrouped.

| | unhideCollapsed | Boolean |

true , if the collapsed columns are displayed after ungrouping; otherwise, false.

|

Example

To ungroup columns in a worksheet, call the ColumnCollection.UnGroup method of the Worksheet.Columns collection. Pass indexes of the first and last columns to be ungrouped, and a value indicating whether or not collapsed columns should be shown after ungrouping.

View Example

csharp
// Ungroup four columns (from the column "C" to the column "F").
worksheet.Columns.UnGroup(2, 5, false);
vb
' Ungroup four columns (from the column "C" to the column "F").
worksheet.Columns.UnGroup(2, 5, False)

The following code snippets (auto-collected from DevExpress Examples) contain references to the UnGroup(Int32, Int32, Boolean) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_API_Part02/SpreadsheetActions/GroupAndOutlineActions.cs#L93

csharp
// Ungroup four columns (from the column "C" to the column "F").
worksheet.Columns.UnGroup(2, 5, false);
#endregion #UngroupColumns

wpf-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_WPF_API_Part02/SpreadsheetActions/GroupAndOutlineActions.cs#L93

csharp
// Ungroup four columns (from the column "C" to the column "F").
worksheet.Columns.UnGroup(2, 5, false);
#endregion #UngroupColumns

spreadsheet-document-api-examples-part2/CS/SpreadsheetDocServerAPIPart2/CodeExamples/GroupAndOutlineActions.cs#L68

csharp
// Ungroup columns "C" through "F".
worksheet.Columns.UnGroup(2, 5, false);
#endregion #UngroupColumns

winforms-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_API_Part02/SpreadsheetActions/GroupAndOutlineActions.vb#L86

vb
' Ungroup four columns (from the column "C" to the column "F").
                    worksheet.Columns.UnGroup(2, 5, False)
' #End Region ' #UngroupColumns

wpf-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_WPF_API_Part02/SpreadsheetActions/GroupAndOutlineActions.vb#L86

vb
' Ungroup four columns (from the column "C" to the column "F").
                    worksheet.Columns.UnGroup(2, 5, False)
' #End Region ' #UngroupColumns

spreadsheet-document-api-examples-part2/VB/SpreadsheetDocServerAPIPart2/CodeExamples/GroupAndOutlineActions.vb#L62

vb
' Ungroup columns "C" through "F".
            worksheet.Columns.UnGroup(2, 5, False)
' #End Region ' #UngroupColumns

See Also

How to: Outline Data Manually

ColumnCollection Interface

ColumnCollection Members

DevExpress.Spreadsheet Namespace