Skip to content

[Android] Group Header/Footer Repeated for All Items When IsGrouped is True for ObservableCollection #28827

Open
@NafeelaNazhir

Description

@NafeelaNazhir

Description

On Android, when IsGrouped is set to True and the ItemsSource is set to ObservableCollection. The GroupHeaderTemplate and GroupFooterTemplate are incorrectly applied to every individual item in the collection. For example, if the ObservableCollection contains 4 items, the group header and footer are displayed 4 times, once for each item instead of showing list.

Screen.Recording.2025-04-07.at.4.21.54.PM.mov

Steps to Reproduce

  1. Run the Application IsGroupedSample 2.zip
  2. Select ItemSource= Observablecollection or List , IsGrouped= true, Select GroupHeaderTemplate and GroupFooterTemplate .
  3. Observe the behavior of the CollectionView.

Expected Behaviour:

  • The GroupHeaderTemplate and GroupFooterTemplate should only be applied when the ItemsSource is a grouped collection.
  • When using a flat ObservableCollection, only the individual items should be displayed, without any group headers or footers.
  • The GroupHeaderTemplate and GroupFooterTemplate should not be applied to individual items in the ObservableCollection.

Actual Behaviour:

  • The GroupHeaderTemplate and GroupFooterTemplate are incorrectly applied to each item in the flat ObservableCollection, resulting in multiple headers and footers—one for every item—even though the data is not grouped.

Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewCollectionView, CarouselView, IndicatorViewpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/android 🤖s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions