We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to call a relay command method when a cell is double clicked.

I have a Syncfusion griddata control and I would like to open up a popup when a cell is clicked. I am not supposed to use eventhandler and I nedd to call a relay command method when the cell is clicked. That method should open up the popup. This is very much urgent. so please help

1 Reply

AR Akila Rajaram Syncfusion Team June 1, 2015 12:38 PM UTC

Hi Jen ,

Thank you for using Syncfusion Products .

We analyzed your query . You can achieve your requirement by using interaction with EventTrigger in WPF .We have prepared a sample for the same and you can download the sample from the following location ,

Sample : http://www.syncfusion.com/downloads/support/forum/119255/ze/GridDataControlsample1488617292

The instance of relay command is passed to Command property of EventTrigger as shown in  the following code example:

XAML :

<i:Interaction.Triggers>


    <i:EventTrigger EventName="MouseDoubleClick">

        <i:InvokeCommandAction Command="{Binding Path=DoubleClickCommand, Mode=TwoWay}" CommandParameter="{Binding ElementName=grid}" />

    </i:EventTrigger>


    <i:EventTrigger EventName="MouseMove">

        <i:InvokeCommandAction Command="{Binding Path=MouseMoveCommand, Mode=TwoWay}" CommandParameter="{Binding ElementName=grid}" />

    </i:EventTrigger>


</i:Interaction.Triggers>


Please let us know if this solution helps you .

Regards,
Akila R.

Loader.
Live Chat Icon For mobile
Up arrow icon