Open Xiaoy312 opened 4 years ago
I also have the same issue on Android. Columns are generated but rows are not displayed. View: https://github.com/scara1701/UnoWithMVVM/blob/master/UnoWithMVVM/UnoWithMVVM.Shared/Views/DetailsView.xaml
ViewModel that grid is bound to: https://github.com/scara1701/UnoWithMVVM/blob/master/UnoWithMVVM.Core/ViewModels/DetailsViewModel.cs
Behavour on UWP with Microsoft.Toolkit.Uwp.UI.Controls.DataGrid works as expected.
GitHub
Lab of Uno platform combinded with new Microsoft.Toolkit.MVVM - scara1701/UnoWithMVVM
GitHub
Lab of Uno platform combinded with new Microsoft.Toolkit.MVVM - scara1701/UnoWithMVVM
Describe the bug
Setting the
DataGrid.ItemsSource
to an enumerable/collection doesnt show the rows of items. Only the columns are generated, ifAutoGenerateColumns
has not been set to false.Steps to Reproduce
Steps to reproduce the behavior:
Expected behavior
The data to be displayed.
Screenshots
n/a
Environment
NuGet Package(s):
Additional context
note: If you attach the assignment to a button handler. Tapping a first time will make the columns to be generated, and tapping it again will cause the rows to be shown.
workaround:
for databinding, just bind to that attached property instead of
ItemsSource
. for code-behind, just callSetDelayedItemsSource
duringOnLoaded
like so: