【发布时间】:2013-02-17 12:01:21
【问题描述】:
我使用WPF DataGrid,
我想bindCurrentCell(已编辑的单元格)的文本与我在 myViewModel 中的属性一起使用
可以这样做吗?
编辑:
我试试这个方法:
<DataGrid CurrentCell="{Binding MyProp}"...../>
我收到此错误:
Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=MyProp; DataItem='MyViewModel' (HashCode=38365672); target element is 'DataGrid' (Name='CustomCmdDg'); target property is 'CurrentCell' (type 'DataGridCellInfo')
【问题讨论】: