Back to Devexpress

RowCollection.UnGroup(Int32, Int32, Boolean) Method

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

latest6.1 KB
Original Source

RowCollection.UnGroup(Int32, Int32, Boolean) Method

Ungroups the grouped rows 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 row to be ungrouped.

| | last | Int32 |

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

| | unhideCollapsed | Boolean |

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

|

Example

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

View Example

csharp
// Ungroup four rows (from the third row to the sixth row) and display collapsed data.
worksheet.Rows.UnGroup(2, 5, true);

// Ungroup four rows (from the ninth row to the twelfth row).
worksheet.Rows.UnGroup(8, 11, false);

// Remove the outer group of rows.
worksheet.Rows.UnGroup(1, 12, false);
vb
' Ungroup four rows (from the third row to the sixth row) and display collapsed data.
worksheet.Rows.UnGroup(2, 5, True)

' Ungroup four rows (from the ninth row to the twelfth row).
worksheet.Rows.UnGroup(8, 11, False)

' Remove the outer group of rows.
worksheet.Rows.UnGroup(1, 12, 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#L70

csharp
// Ungroup four rows (from the third row to the sixth row) and display collapsed data.
worksheet.Rows.UnGroup(2, 5, true);

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

csharp
// Ungroup four rows (from the third row to the sixth row) and display collapsed data.
worksheet.Rows.UnGroup(2, 5, true);

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

csharp
// Ungroup rows 3 through 6 and display collapsed data.
worksheet.Rows.UnGroup(2, 5, true);

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

vb
' Ungroup four rows (from the third row to the sixth row) and display collapsed data.
worksheet.Rows.UnGroup(2, 5, True)

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

vb
' Ungroup four rows (from the third row to the sixth row) and display collapsed data.
worksheet.Rows.UnGroup(2, 5, True)

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

vb
' Ungroup rows 3 through 6 and display collapsed data.
worksheet.Rows.UnGroup(2, 5, True)

See Also

How to: Outline Data Manually

RowCollection Interface

RowCollection Members

DevExpress.Spreadsheet Namespace