The
RadListView
control is now obsolete and will be removed in the future. Use the RadCollectionView control instead. TheRadCollectionView
is a complete, ground-up rewrite of the ListView. TheRadCollectionView
offers improved performance, enhanced features, and a modernized approach to managing lists of data. TheRadCollectionView
incorporates all of the ListView's key features. More about the differences between both components and how to migrate to the newRadCollectionView
is available in the Migrating the Telerik .NET MAUI RadListView to RadCollectionView article.
.NET MAUI ListView Property Group Descriptor
You can group the data by a property value from the class that defines your items. This descriptor exposes the following properties:
-
PropertyName
—Defines the string name of the property you want to group by. -
SortOrder
—Defines the sort order in each group to Ascending or Descending.
1. Add the following business object:
2. Add a ViewModel
with a collection of Cities:
3. Group the Cities by the Country
property through the PropertyGroupDescriptor
:
4. Add the Templates
definition in the page resources:
5. Include the telerik
namespace:
For the ListView PropertyGroupDescriptor example, go to the SDKBrowser Demo Application and navigate to ListView -> Grouping category.