Skip to content

[Android] Fixed issue where group Header/Footer template was applied to all items when IsGrouped was true for an ObservableCollection #28886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Tamilarasan-Paranthaman
Copy link
Contributor

Root Cause of the issue

  • The items in the ItemsSource collection were being cast to IEnumerable and added to the groups collection, even when they were not actually of an IEnumerable type. As a result, these individual items were incorrectly treated as groups, leading to group-related behaviors such as the display of group headers and footers.

Description of Change

  • I have added a type check to ensure that only items that implement IEnumerable are added to the groups collection. If an item is not an IEnumerable, it will no longer be treated as a group, and the groups collection will remain empty in such cases.

Issues Fixed

Fixes #28827

Tested the behaviour in the following platforms

  • iOS
  • Android
  • Windows
  • Mac

Screenshot

Before Fix After Fix
Before-Fix.mov
After-Fix.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Apr 9, 2025
Copy link
Contributor

Hey there @@Tamilarasan-Paranthaman! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Apr 9, 2025
@jsuarezruiz jsuarezruiz added platform/android 🤖 area-controls-collectionview CollectionView, CarouselView, IndicatorView labels Apr 10, 2025
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman marked this pull request as ready for review April 10, 2025 09:52
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman requested a review from a team as a code owner April 10, 2025 09:52
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android 🤖
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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