None of the examples you guys have or I've been able to find are a solution to what should be an easy problem. Right-click on a grid row, show the context menu, and when the user selects an items from the context menu, pass the id from the row to the page view model.
I did find this post but because it uses a UI element for the binding path and it uses code behind instead of MVVM, it's not a solution but my code is based on this.
Here is my context menu code.
<telerik:RadGridView.RowStyle>
<Style TargetType="telerik:GridViewRow">
<Setter Property="telerik:RadContextMenu.ContextMenu">
<Setter.Value>
<telerik:RadContextMenu>
<telerik:RadMenuItem Header="Open"
Command="{Binding OpenCommand}"
CommandParameter="{Binding Path=.}" />
<telerik:RadMenuItem Header="Delete"
Command="{Binding DeleteCommand}"
CommandParameter="{Binding Path=.}" />
<telerik:RadMenuItem Header="Print"
Command="{Binding ReportCommand}"
CommandParameter="{Binding Path=.}" />
</telerik:RadContextMenu>
</Setter.Value>
</Setter>
</Style>
</telerik:RadGridView.RowStyle>
The problem is it thinks the commands are in the view model for the grid row data so I'm getting binding failures.
DeleteCommand property not found on object of type JobVm.
I need to have it use the commands in my page view model. How can I achieve this? I've tried dozens of combinations of setting the RelativeSource but none of them seem to work.