When grouping is turned on for a sheet, a separate target group data model is available to the sheet (or spreadsheet component) and this group data model is flat, completely without a hierarchy. This contains the group headers and other grouping-specific display data. Underneath that model is a target data model where the row data resides.
You can customize grouping by specifying your own comparer. For example, you can create a custom group that is by decade if the column has year information. As the Grouping event is raised, you can pass in your own IComparer (call it MyComparer, for example). You can determine what is displayed in the group header by setting the Text property for that group.
The filter advanced form in the samples folder (\Samples\Vb\SpreadWinDemo) shows how to create a custom filter. More information about creating a custom group is available on our online technical support forum.
Return to the overview of Managing Grouping of Rows of User Data