The CollectionView class allows you to group items based on their content. In most cases, the content is the value of a property (e.g. Product, Color, Country), but you can also group by calculated values by overriding the GroupDescription's groupNameFromItem method.
Custom grouping can be useful to group data into value bins (e.g. high, low, medium), date ranges (e.g. this week, this year), etc.
This sample demonstrates this by creating a GroupDescription that returns the first letter of the name. This groups the data by initial: