【发布时间】:2010-10-30 22:14:20
【问题描述】:
我得到了以下示例,WPF DataGrid 以 MVVM 模式绑定到 ViewModel,但它是只读的:
MVVM example which has buttons that switch the data in the ViewModel
我尝试对其进行扩展,以便将 DataGrid 绑定到一个 可观察的 ViewModel 集合,以便编辑单元格会在相应的 ViewModel 上触发 OnPropertyChanged 事件,但无法让它按照我的方式工作想要。
有谁知道这样做的代码示例,即将 DataGrid 绑定到不具有 OnPropertyChanged 属性和委托命令的 ViewModel 集合等?
【问题讨论】:
标签: wpf data-binding datagrid mvvm