Skip to content
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

Selected Item corrupts after scroll or rebind. #162

Closed
HarborIntex opened this issue Feb 23, 2024 · 3 comments
Closed

Selected Item corrupts after scroll or rebind. #162

HarborIntex opened this issue Feb 23, 2024 · 3 comments

Comments

@HarborIntex
Copy link

I am binding the grid to a dataset and then preselecting the first row.
The grid contains 20 or so rows with the first 5 visible.
Selecting of the visible rows works fine, firing the ItemSelected event.

However - if you scroll so the first rows are not visible and then scroll back - then those rows do not select with the Selected Row color however the event still fires correctly.

If I then rebind - it selects the first row again properly - but then if you tap to select any other row - the ItemSelected fires but the visible selected row remains the first row.

Thoughts on what is going on? In summary - the grid works fine - but the visible selected row becomes corrupt.

@symbiogenesis
Copy link
Collaborator

symbiogenesis commented Feb 26, 2024

What platform is this? What .NET version? Also, can you repeat this using the sample app with the current main branch?

For just scrolling , my guess is this sounds like a platform-specific bug in MAUI itself. But if you are referring to sorting or pagination, I know that the selected item is lost in that case too. I opened an issue about that already:

#157

@HarborIntex
Copy link
Author

.NET 8 and Android.
I don't think it is scrolling issue because even on a rebind it does the same thing.

  • For instance - it will load the 15 records with the first 5 visible.
  • Click on the 2nd and 3rd rows and it becomes the active row as expected.
  • Rebind the dataset and while the ItemSelected event will still fire - the active row will no longer update.

@HarborIntex
Copy link
Author

This is also now working after 4.04 (or possibly 2 or 3 - I did not specifically retest after either of those).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants