.NET MAUI CollectionView Grouping
The .NET MAUI CollectionView provides you with the functionality to programmatically group its data at runtime. You can programmatically group the data by adding group descriptors to the RadCollectionView.GroupDescriptors
collection. To achieve this, use the following descriptors:
The Grouping is part of Telerik UI for .NET MAUI, the most comprehensive UI suite for .NET MAUI! To try it out, sign up for a free 30-day trial and kickstart your cross-platform app development today.
-
PropertyGroupDescriptor
—Uses a property from the model as a group key. -
DelegateGroupDescriptor
—Enables you to group by a custom key (for example, some complex expression combining two or more properties) instead of being limited by the value of a single property.
Group Header
When a group descriptor is applied, the default group template is visualized. Review the Group Header article to learn more about how to style and customize the group header.
Expand and Collapse Groups
The control supports groups expand and collapse operations through the UI by tapping on the group headers.
Bindable GroupDescriptor
Users can control the GroupDescriptors
collection by using MVVM.
Styling the Group Header
Style the group header by setting the following properties:
-
GroupContainerStyle
(Style
with target typeRadCollectionViewGroupItem
)—Specifies the style applied to the group header when grouping is applied.