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
DataGrid
event handling bug.
#4969
Comments
Hello davidxuang, thank you for opening an issue with us! I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌 |
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
2 similar comments
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Describe the bug
When
DataGrid
handles a remove event when resort happens, it gets the removed item from the sender:However, since the item is already removed from the sender, it will get the wrong item. This can be verified by the source of
AdvancedCollectionView
Particularly, if an item is removed from the end, the index will be out of the bound of the source list, thus an
ArgumentOutOfRangeException
will be thrown by theAdvancedCollectionView
, with such stack trace:Regression
No response
Reproducible in sample app?
Steps to reproduce
Expected behavior
The
DataGrid
should get the right removed item when handling event.Screenshots
Windows Build Number
Other Windows Build number
No response
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
No response
Device form factor
Desktop
Nuget packages
communitytoolkit.winui.ui.controls 7.1.2
communitytoolkit.winui.ui.controls.datagrid 7.1.2
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.
The text was updated successfully, but these errors were encountered: