dotnet / dotnet/docs-maui

CollectionView does not display grouped data header by default

Open
#2,024 1 comment 0 reactions 0 assignees View on GitHub
dotnet-maui/subsvc dotnet-mobile/svc Pri2 product-feedback
Dominant language
No language data
Stars
282
Forks
265
Avg merge
2d 2h
Merged PRs (30d)
19

Description

### Type of issue

Code doesn't work

### Description

When passing in a collection of group items with name attributes as the CollectionView ItemsSource, the names are not displayed as the header by default like it says in the documentation. A GroupHeaderTemplate must be made and the Name attribute must be passed into it for the header to be displayed.
![image](https://github.com/dotnet/docs-maui/assets/107957580/d97c02b3-2741-4534-90cc-6d103157958b)

With GroupHeaderTemplate
![image](https://github.com/dotnet/docs-maui/assets/107957580/767b76a3-5314-429a-aa05-5d47fc6e380d)

Without GroupHeaderTemplate
![image](https://github.com/dotnet/docs-maui/assets/107957580/ef02e4f5-c5e0-4b30-a21c-27386e050fc5)

### Page URL

https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/collectionview/grouping?view=net-maui-8.0

### Content source URL

https://github.com/dotnet/docs-maui/blob/main/docs/user-interface/controls/collectionview/grouping.md

### Document Version Independent Id

56201296-c616-f9e0-bf20-e44931abe815

### Article author

@davidbritch

### Metadata

* ID: 56201296-c616-f9e0-bf20-e44931abe815
* Service: **dotnet-mobile**
* Sub-service: **dotnet-maui**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.