【发布时间】:2015-07-16 13:39:01
【问题描述】:
我想根据某些业务逻辑禁用单元格/列。我正在使用ShowingEditor 事件和ShowingEditorEventArgs 来取消它。传递ShowingEditorEventArgs 会非常好。我可以将整个网格作为参数传递。使用下面的代码。但我只想传递选定单元格的ShowingEditorEventArgs。可能是一些相关的资源绑定帮助我在这里。
<dxg:GridControl x:Name="grid" >
<dxg:GridControl.View>
<dxg:TableView Name="view" ShowingEditor="view_ShowingEditor">
<i:Interaction.Triggers>
<i:EventTrigger EventName="ShowingEditor">
<i:InvokeCommandAction Command="{Binding ShowingEditorCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type dxg:GridControl}}}" />
... 注意:
- 我无法使用 MVVM 灯(GalaSoft)。
-
交互没有给我 CallMethodAction。
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" <ei:CallMethodAction 我不想传递
ViewModel的绑定属性(例如SelectedItem)- 使用 DevExpress GridControl
【问题讨论】:
标签: wpf mvvm devexpress-wpf