Client-Side API Reference > CollectionView > PropertyGroupDescription Class |
constructor(property: string, converter?: Function): PropertyGroupDescription
Initializes a new instance of the PropertyGroupDescription class.
The name of the property that specifies which group an item belongs to.
A callback function that takes an item and a property name and returns the group name. If not specified, the group name is the property value for the item.
Describes the grouping of items using a property name as the criterion.
For example, the code below causes a CollectionView to group items by the value of their 'country' property:
You may also specify a callback function that generates the group name. For example, the code below causes a CollectionView to group items by the first letter of the value of their 'country' property: