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
RE: How to get double click on xamDataGrid row to invoke a method on associated ViewModel ?


We are trying to strictly implement MVVM in our application which uses the xamDataGrid extensively. For instance when you click on a button we are able to call a method in our associated ViewModel class using the standard binding syntax:
<Button Name="btnAddTrade" Command="{Binding Path=AddTrade}" />

This works fine for button clicks etc. where you can specify a "Command" (which is a DelegateCommand in the associated ViewModel class.

Even works for right click items on the xamDataGrid such as:
<MenuItem Header="Split" Name="cmnuSplitTrade" Command="{Binding Path=SplitCommand}" />

My question is - how to implement something similar for a double click event on the xamDataGrid ?
e.g. <igDP:XamDataGrid DataSource="{Binding Path=TradeResults}" MouseDoubleClick="{Binding Path=SomeMethod}">

I realise this syntax wont work but is there must be some way I can wire this event directly up to a ViewModel method..
Does anyone know of a way this can be done without putting anything in the code behind file?

Thanks in advance!