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

DataGrid refresh doesn't work while the refreshed row attached to VisualTree #110

Open
tiborkerenyi opened this issue Sep 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tiborkerenyi
Copy link

Describe the bug

DataGridTest.zip

DataGrid_refresh_issue.mp4

To Reproduce

  1. Run the test solution.
  2. Watch the line 55.

As you can see in the video, line 55 is only updated when it re-enters the visible area.
(Until then, the row will be erroneously moved to row 2.)

Expected behavior

When the ObservableCollection changes, the DataGrid should also be updated.

Avalonia version

11.1.1

OS

Windows

Additional context

No response

@tiborkerenyi tiborkerenyi added the bug Something isn't working label Sep 24, 2024
@tiborkerenyi
Copy link
Author

If you change this two lines in the code, it works proprerly:

adatok[0] = adat;
adatok[55] = adat; => failure

adatok[55] = adat;
adatok[0] = adat; => works well

@nww02
Copy link

nww02 commented Feb 25, 2025

+1 on this one.

When I select a row in a DataGrid I show a panel to the right with the row's contents for better display and editing.

When Selecting an Item,
a) a reference is set in the ViewModel to the dataGrid.SelectedItem.
b) an Observable boolean "ShowEditPanel" is set to 'true'.

When the panel sees the boolean change, it pops up. The DataSource is set to the reference object in the Viewmodel. It shows the row contents perfectly. However, when I change the object using TwoWay binding in the panel, the original data cell doesn't update until I scroll the row out of sight, and back again.

@MrJul MrJul transferred this issue from AvaloniaUI/Avalonia Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants