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 does not update OneWay bound values on arrays. #106

Open
cornerbowlsoftware opened this issue Sep 2, 2024 · 0 comments
Open

DataGrid does not update OneWay bound values on arrays. #106

cornerbowlsoftware opened this issue Sep 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cornerbowlsoftware
Copy link

cornerbowlsoftware commented Sep 2, 2024

Describe the bug

The DataGrid does not update cell values when bound to an array.

To Reproduce

Create a project that loads a row into a datagrid. Make sure the ItemsSources is set to an ObservableCollection of INotifyPropertyChanged implemented classes. Define the class with both Properties and Array Properties. Use code behind to add DataGrid columns with their appropriate bindings. Create event handlers to update both Properties and Array Properties. Notice only the Properties are updated. Array driven bindings draw the first time but do not update.

Please see the attached project to duplicate the bug. Clicking on the middle button in the application duplicates the bug.

AvaloniaDataBindingBug.zip

Expected behavior

Array driven columns values should update.

Avalonia version

11.2.0-beta1

OS

Windows

Additional context

This is documented to work here:
https://docs.avaloniaui.net/docs/basics/data/data-binding/data-binding-syntax

<TextBlock Text="{Binding Students[0].Name}"/>

@cornerbowlsoftware cornerbowlsoftware added the bug Something isn't working label Sep 2, 2024
@cornerbowlsoftware cornerbowlsoftware changed the title DataGrid does not support OneWay binding on arrays. DataGrid does not update OneWay bound values on arrays. Sep 2, 2024
@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

1 participant