【发布时间】:2018-11-12 20:05:49
【问题描述】:
在 UWP 中,我能够使用以下示例将 SfDataGrid 的列绑定到 ViewModel 中的属性:https://www.syncfusion.com/kb/7811/how-to-bind-a-column-collection-from-viewmodel
但是,在 Xamarin.Forms 中对 SfDataGrid 执行相同的方法会导致异常:“System.Exception: SfDataGrid.Columns can't be null”。
Xamarin.Forms 中是否不支持列的 ViewModel 绑定?如果是,我有哪些替代方法可以使用动态列创建网格?
提前致谢。
【问题讨论】: