Replies: 3 comments 1 reply
-
Found workaround - use dynamic binding for DataGrid columns
|
Beta Was this translation helpful? Give feedback.
-
If there's an additional type annotation required in the XAML to get this to work, improved messaging around it would be a great resolution. |
Beta Was this translation helpful? Give feedback.
-
Yes, compile error message should be more helpful. Normally, DataGrid columns should pick-up properties from ItemsSource collection children without any extra annotation. |
Beta Was this translation helpful? Give feedback.
-
Version Info
Avalonia 11.0.10
Nature of Issue
Introducing a DataGrid column when CompiledBindings are set to true causes an XAML compilation error. It is very confusing.
Isolation of Issue
This has to do with DataGrid and compiled bindings (see workaround below)
Expected Behavior
Compiled bindings should work for DataGrid columns
XAML binding (error is coming from "{Binding ViewModel.CustomerId}")
Note: Customers implements
IReadOnlyList<AsyncVirtualizingCollectionProxy<TViewModel>>
where TViewModel is CustomerViewModel [which declares CustomerId, PhoneNumber, FirstName, LastName]Output from Build
Beta Was this translation helpful? Give feedback.
All reactions