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.

How to catch and handle right-click ?

Thread ID:

Created:

Updated:

Platform:

Replies:

88756 Aug 11,2009 09:33 AM Aug 18,2009 05:45 AM WPF 3
loading
Tags: GridControl
Nazim YENIER
Asked On August 11, 2009 09:33 AM

Hi,
I am trying to have the following behaviour with Syncfusion GridControl :

-> Selecting a range of cells
-> Right-click on the selected range
-> A drop-down menu opens with 'span cells' option.
-> Span the selected range using the 'covered cells' feature.

Now, when I right-click on a selected range it is automatically unselected. I don't want this.
I want to intercept the right-click and that the selected range stay as it is so that I can then span selected cells.

I've tried the 'syncfusionGrid_CellMouseDown' method but couldn't prevent the selected range of being unselected.

I am quite new to WPF and Syncfusion. I'll be gratefull for your help.

Thanks in advance

Nazim YENIER
SAGE Experts-Comptables

Clay Burch [Syncfusion]
Replied On August 12, 2009 04:44 AM

Attached is a sample with a context menu that has a menu item that covers the selected cells.





ContextMenu2_a28cb75c.zip

Nazim YENIER
Replied On August 12, 2009 06:11 AM

Thanks a lot, it works great.

In fact, all I needed was the following :

private void syncfusionGrid_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
e.Handled = true;
}

Nazim YENIER

Mohamed Suhaib Fahad A. [Syncfusion]
Replied On August 18, 2009 05:45 AM

Hi Nazir,

Thanks for your feedbacks. We are glad you got it working.

Thanks,
Fahad
Grid.WPF Team
Syncfusion Inc.,

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.

;