Binding doubleclick command MVVM

Hi, 


I am working on a hobby project to create a digital book collection application. I am using the sdfatagrid control to visualize all the books I have in my collection. 

        <syncfusion:SfDataGrid ItemsSource="{Binding Books}" SelectedItem="{Binding Book}" Height="500" MouseDoubleClick="{Binding ViewBookCommand}"
                                          IsReadOnly="True" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.ColumnSpan="3"
                       AutoGenerateColumns="True" AllowFiltering="True" Grid.Row="1" NavigationMode="Row" x:Name="booksGrid">
            
            <syncfusion:SfDataGrid.InputBindings>
                <MouseBinding Gesture="LeftDoubleClick" Command="{Binding ViewBookCommand}" CommandParameter="{Binding ElementName=booksGrid, Path=SelectedItem}"/>
            </syncfusion:SfDataGrid.InputBindings>
        </syncfusion:SfDataGrid>

I am using the above code in my XAML view. Since I am using MVVM (specifically MVVMCROSS) I want to navigate to a different view with more details about the book. 

Unfortunately, the code above doesn't work and no errors are given either. Could someone help me out to get it to work with the InputBindings and MouseBindings elements?

Thanks in advance. 


6 Replies 1 reply marked as answer

MA Mohanram Anbukkarasu Syncfusion Team March 15, 2021 11:03 AM UTC

Hi Moustafa, 

Thank for contacting Syncfusion support.  

Currently, SfDataGrid doesn’t have support for input bindings. We have already completed the implementation to provide input binding support for F2 and LeftDoubleClick. This will be available in our upcoming 2021 Volume 1 main release which is expected to be rolled out in the month of March 2021.  

We are currently working to provide input binding support for all the possible keys. We will implement this support in our 2021 Volume 1 Service Pack release which is expected to be rolled out in the mid of April 2021. We will let you know once it is available for download.   


Regards,  
Mohanram A. 



ME Moustafa Elhagaly March 31, 2021 03:12 PM UTC

Hi Mohanram, 

It came to my attention that 2021 Volume 1 was released today: https://www.syncfusion.com/blogs/post/syncfusion-essential-studio-2021-volume-1.aspx
Does this mean that input binding (F2 key and LeftDoubleClick) are available as of now? 

I don't seem to be able to find it in the Release Notes or in the Documentation. 

Looking forward to hearing from you!



MA Mohanram Anbukkarasu Syncfusion Team April 1, 2021 01:46 PM UTC

Hi Moustafa, 

Thanks for the update.  

We have forwarded this query to our development team. We will check and update with further details on April 6, 2021. We appreciate your patience until then.  

Regards, 
Mohanram A. 



MA Mohanram Anbukkarasu Syncfusion Team April 5, 2021 11:10 AM UTC

Hi Moustafa, 

Thanks for your patience.  

We have checked with the development team regarding this. We have included the input binding support for F2 key and LeftDoubleClick in our 2021 Volume 1 main release. Please find the sample from the following link. 


Please let us know if you require further assistance from us.  

Regards, 
Mohanram A.  


Marked as answer

ME Moustafa Elhagaly May 25, 2021 03:41 PM UTC

Hi Mohanram,

Sorry for the delay.
Thank you for the Example project. It works like a charm. 

Kind regards,

Moustafa Elhagaly


MA Mohanram Anbukkarasu Syncfusion Team May 26, 2021 04:34 AM UTC

Hi Moustafa, 

Thanks for the update.  

We are glad to know that the provided solution worked at your end. Please let us know if you require any other assistance from us. We are happy to help you.  

Regards, 
Mohanram A. 


Loader.
Up arrow icon