ビジネスロジックに基づいてセル/列を無効にしたい。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 light ( GalaSoft )が使えません。
インタラクションで CallMethodAction が得られません。
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" <ei:CallMethodAction
のバインドされたプロパティを渡したくありません
ViewModel
(例SelectedItem
)- DevExpress GridControl の使用