Spread Windows Forms 9.0 Product Documentation > Developer's Guide > Customizing Row or Column Interaction > Managing Grouping of Rows of User Data > Setting the Appearance of Grouped Rows |
You can customize the appearance of the group headers and the grouped rows. For an introduction to the user interface for grouping, refer to Using Grouping.
You can set up the display so that the items are shown initially all expanded or all collapsed when grouping is performed. The GroupingPolicy property only applies to new groups.
You can set the colors and other formatting of both the hierarchy names and the data in the rows when grouping is performed.
You can hide or display the grouping bar at the top of the sheet.
The following table describes the members used for customizing the appearance of grouped rows:
Grouping API Member | Description |
---|---|
IGroupSupport interface | Interface that supports grouping |
GroupDataModel class | Class of grouping data in the underlying models |
Group class | Class in the underlying models that supports grouping |
Grouped and Grouping events | Events in FpSpread class |
GroupInfo | Class that represents grouping information |
GroupInfoCollection | Collection of grouping information |
For more information on other hierarchical displays of data, refer to Working with Hierarchical Data Display.
You can also define a set of properties in an array list called GroupInfo. Set the appearance of grouped rows by adding styles to the array list of appearance properties for grouping. A collection of GroupInfo objects is in the GroupInfoCollection. To set the appearance settings in a GroupInfo to a particular sheet, set the GroupInfos property on that sheet. Appearance settings for grouping include:
Only column and sheet appearance settings remain when grouping is turned on. Since rows and cells are moved when the grouping feature is turned on, any style or span settings are ignored.
For more information about the group data model and the effect on the sheet data model, refer to Creating a Custom Group. You can use the IsGroup method, which determines whether a requested row is a data row or a group header row.
For more information about group footers, refer to Displaying a Footer for Columns or Groups.