2
我使用WPF DataGrid
,绑定属性的视图模型来CurrentCell
我想bind
的CurrentCell
的财产的文本(编辑单元),我有我的ViewModel
是否有可能做这个?
编辑:
我试着这样说:
<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')
是的,问题是,我想绑定属性的当前编辑单元 – 2013-02-17 12:13:39
您是否尝试过这种方式? –
2013-02-17 12:15:30
它绑定到所有datagridtextcolumn而不是当前编辑列 – 2013-02-17 12:17:08