Skip to content

[10.0.90] ScrollTo(0) not working anymore on CollectionView when IsGrouped="True" #37259

Closed

Description

@tranb3r

Description

The issue described in #35313 has reappeared in 10.0.90:

  • no issue in 10.0.51
  • bug in 10.0.60
  • fix in 10.0.70
  • no issue in 10.0.80
  • bug in 10.0.90

Link to public reproduction project repository

No response

Version with bug

10.0.90

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

10.0.80

Affected platforms

Android

Activity

  1. added
    t/bug
    on Aug 10, 2026
  2. added
    area-controls-collectionview
    on Aug 10, 2026
  3. NafeelaNazhir commented on Aug 10, 2026

    @NafeelaNazhir
    Contributor

    This issue has been validated in Visual Studio Code 1.132.0 with .NET MAUI versions 10.0.80 and 10.0.90. It can be reproduced on the Android platform from 10.0.90.

    10.0.80 version(Issue not reproduced) 10.0.90 version (Issue reproduced)
    Screen.Recording.2026-08-10.at.4.26.31.PM.mov
    Screen.Recording.2026-08-10.at.4.22.07.PM.mov
  4. added
    s/verified
    s/triaged
    i/regression
    on Aug 10, 2026
  5. added
    partner/syncfusion
    on Aug 10, 2026
  6. vishnumenon2684 commented on Aug 10, 2026

    @vishnumenon2684
    Contributor

    Hi @tranb3r

    In the sample, the scroll operation uses ScrollTo(54), which assumes that group headers are counted as items and therefore targets the last item in the list. However, on other platforms, group headers were already not considered as items for indexing. Starting with version 10.0.90, Android was aligned with this existing behavior across other platforms. Therefore, you can use either of the following approaches to achieve the same scenario:
    Use collectionView.ScrollTo(49) or
    Use group-based indexing:
    collectionView.ScrollTo( index: 9, groupIndex: 4)

  7. tranb3r commented on Aug 10, 2026

    @tranb3r
    Author

    @vishnumenon2684
    How do you scroll to the top? (not the first item, but the first group header)
    How do you scroll to the end? (not the last item, but the last group footer)

  8. vishnumenon2684 commented on Aug 11, 2026

    @vishnumenon2684
    Contributor

    Hi @tranb3r
    For scroll to the top (not the first item, for the first group header) , use the below line of code:
    MyCollectionView.ScrollTo(0, position: ScrollToPosition.Center);

    To scroll to the end (not the last item, for the last group footer), use the below line of code:
    MyCollectionView.ScrollTo(49, position: ScrollToPosition.Center);

  9. kubaflo commented on Aug 11, 2026

    @kubaflo
    Contributor

    I validated this end-to-end in the MAUI Sandbox on the exact 10.0.80 and 10.0.90 source tags, using the same grouped data as the repro (5 groups × 10 items).

    Result

    This appears to be an intentional index-semantics change rather than ScrollTo(0) failing:

    • 10.0.80: ScrollTo(54) reaches the last item because Android effectively counts the 5 group headers in the flat index. ScrollTo(0) then returns with the first group header visible.
    • 10.0.90: the flat index counts only the 50 data items. Therefore ScrollTo(54) is out of range and leaves the list at the top, which makes the following ScrollTo(0) look like a no-op.
    • On 10.0.90, after a valid ScrollTo(49, Center), plain ScrollTo(0) does return to the first data item. The first group header is just above the viewport because the default position is MakeVisible.

    I also added actual group footers and tested both suggestions from #37259 (comment):

    MyCollectionView.ScrollTo(0, position: ScrollToPosition.Center);
    MyCollectionView.ScrollTo(49, position: ScrollToPosition.Center);

    On 10.0.90 these expose the first group header and last group footer respectively.

    Videos

    MAUI 10.0.80

    issue-37259-android-maui-10.0.80-playable.mp4

    MAUI 10.0.90

    issue-37259-android-maui-10.0.90-playable.mp4

    Environment: Android 15 / API 35 emulator (sdk_gphone64_arm64), net10.0-android; exact MAUI tag commits f9b311be07682fbe1714a18eba44d85ef24180fe and 8e2547a4707f745a27a7791495b240e756926980.

    Source history supports this interpretation: PR #35823 intentionally changed Android to map a flat data-item index to the native adapter position while excluding group headers/footers. That also matches the public API wording, which describes index as the zero-based index of the item.

    One nuance: the statement that this behavior already existed uniformly on all other platforms is broader than the history I found—iOS/Mac grouped flat-index handling was also changed around this release in PR #35609. But the 10.0.90 Android behavior itself is clearly intentional.

  10. locked and limited conversation to collaborators on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewi/regressionpartner/syncfusionplatform/androidregressed-in-10.0.90s/triageds/verifiedt/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions