Skip to content

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

Open
@cornerbowlsoftware

Description

@cornerbowlsoftware

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}"/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions