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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to catch and handle right-click ?

Thread ID:





88756 Aug 11,2009 01:33 PM UTC Aug 18,2009 09:45 AM UTC WPF 3
Tags: GridControl
Asked On August 11, 2009 01:33 PM UTC

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

SAGE Experts-Comptables

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

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


Replied On August 12, 2009 10:11 AM UTC

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;


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

Hi Nazir,

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

Grid.WPF Team
Syncfusion Inc.,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon