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.
In continuation with the above thing . i need to implement one more feature . When a particular menuitem is clicked . I need to show a popup in which we have a dropdownlist and when a item is selected and clicked ok . It needs to be retrieved from a command
Note : I am using MVVM pattern .
Please can you help me out in extending the sample with the requested functionality
Thanks
Chandu
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
cool ! the logic worked for me ..Thanks a ton ..
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.