I have a XamDataGrid that is binded to a list of 'MyItem' objects.
I am trying to add a context-menu to group headers in my XamDataGrid, so I have the following defined in my Xaml file:
<ContextMenu x:Key="contextMenu_GroupByRecordPresenter">
<MenuItem x:Name="menuItemCheckItems" Header="Check Items"
Click="menuItemGRP_CheckItems_Click" />
<MenuItem x:Name="menuItemOpenItems" Header="Open Items" Click="…" />
</ContextMenu>
<Style TargetType="{x:Type igDP:GroupByRecordPresenter}">
<Setter Property="ContextMenu"
Value="{StaticResource contextMenu_GroupByRecordPresenter}" />
<EventSetter Event="ContextMenuOpening" Handler="GRP_ContextMenuOpening" />
</Style>
And in the code behind:
private void menuItemGRP_CheckItems_Click(object sender, RoutedEventArgs e)
{ }
When the user selects the 'Check Items' item on the context-menu, I need to get all the 'MyItem' objects under this group header.
So, in code behind
How do I get them?
I may need to disable the 'Check items' item in the context-menu if the group header contains other group-headers under it, so how can I know that?
Hello Hagit,
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.
Sincerely,
Horen
Software Developer
Infragistics
Thanks for your fast reply.
It was very helpful.
I am glad your issue has been resolved.