FlexSheet for WPF | ComponentOne
Working with C1FlexSheet / Sheet Operations / Grouping and Ungrouping Rows
In This Topic
    Grouping and Ungrouping Rows
    In This Topic

    FlexSheet for WPF provides you the ease to group data in a sheet where you might have a huge amount of data and want to organize it. Data can easily be organized in groups using GroupRows method in C1FlexSheet control that allows you to divide the data and show or hide different sections of the worksheet.

    Following lines of code illustrate the use of GroupRows method for grouping rows in C1FlexSheet control:

    flex.GroupRows(flex.Selection)
    
    flex.GroupRows(flex.Selection);
    

    On applying grouping, the output will look similar to the image given below. In this example we have grouped first four rows in a worksheet.

    Grouping Rows

    If you want to Ungroup rows, you can use the UnGroupRows method illustrated in the following code:

    flex.UnGroupRows();