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.
Unfortunately, activation email could not send to your email. Please try again.

DoubleClick on record

Thread ID:

Created:

Updated:

Platform:

Replies:

116342 May 16,2014 08:32 AM Jun 26,2014 05:41 PM WPF 2
loading
Tags: SfDataGrid
Juraj Tomana
Asked On May 16, 2014 08:32 AM

Hi.

Please, how can I catch double-click on the record?

Thanks.
Regards,
Juraj

Saravanan C [Syncfusion]
Replied On May 21, 2014 08:47 AM

Hi Juraj,

 

Thank you for contacting Syncfusion Support.

 

We have analyzed your query and you can achieve you requirement by using the MouseDoubleClick event. Please refer the following code snippet:

 

Code Snippet[C#]:

this.dataGrid.MouseDoubleClick += dataGrid_MouseDoubleClick;

 

void dataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)

{

    var rowControl = this.FindDescendant(e.OriginalSource, typeof(VirtualizingCellsControl)) as VirtualizingCellsControl;

    if(rowControl != null)

    {

        var recordData = rowControl.DataContext as OrderInfo;

        if(recordData != null)

        {

            MessageBox.Show(recordData.CustomerID);

        }

    }

               

}

 

We have created a sample based on your requirement. Please find the sample in the following location:

 

Sample: http://www.syncfusion.com/downloads/support/directtrac/124536/MouseDoubleClick-632792349.zip

 

Please let us know if  this solution helps you.

 

Thanks,

Saravanan C


Henry Harris
Replied On June 26, 2014 05:41 PM

Is this possible in xaml without code behind?

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;