Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
775
XamDatagrid Conetxt Menu
posted
Hi I have a xamdatagrid context menu in following way . I need to disable some menuitem 
based on some logic in code behind . I am mvvm pattern so we cant use codebehind page of design.
<igDP:XamDataGrid.ContextMenu >
    <ContextMenu   DataContext="{Binding RelativeSource={RelativeSource Mode=Self}, Path=PlacementTarget.DataContext}" AllowDrop="True" Name="cmAudit">
     <MenuItem  Header="Open" Command="{Binding MenuClickedCommand}" CommandParameter="Open"/>
     <MenuItem  Header="Hold" Command="{Binding MenuClickedCommand}" CommandParameter="Hold"/>
     <MenuItem  Header="Approved" Command="{Binding MenuClickedCommand}" CommandParameter="Approved"/>
     <MenuItem  Header="Ignore" Command="{Binding MenuClickedCommand}" CommandParameter="Ignore"/>
     <MenuItem  Header="Deactivated" Command="{Binding MenuClickedCommand}" CommandParameter="Deactivated" />
     <MenuItem  Header="Reassign" IsEnabled="False" Command="{Binding WorkListContextMenuClickedCommand}" CommandParameter="Reassign"/>                        
     </ContextMenu>
</igDP:XamDataGrid.ContextMenu>
Basically , How to disable this items from viewmodel .It is bit urgent .any help is greatly appreciated.