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

Cell Selection & Right Click

Thread ID:





35478 Sep 30,2005 07:48 PM UTC Oct 1,2005 03:46 AM UTC WinForms 1
Tags: GridControl
Clinton Nielsen
Asked On September 30, 2005 07:48 PM UTC

Hi, I would like to be able to select cells with either the left or right mouse button. If however, the user clicks with the right mouse button on a cell that is already part of a selection, I don''t want the selection to change. The SelectionChanging(...) method does not let you know which mousebutton was used to trigger the selection change, so I couldn''t cancel the change there. I thought perhaps I would trap the MouseDown(...) event before SelectionChanging(...) occurred to get which button was pressed, but for some strange reason, apparently the SelectionChanging(...) method occurs before the MouseDown(...) event. That seems particularly odd to me. In any case, how would you suggest finding out which button was used to change the selection, before the selection actually changes at all, so that it can be cancelled if necessary? Thanks

Administrator [Syncfusion]
Replied On October 1, 2005 03:46 AM UTC

You can use Control.MouseButtons to test what mouse button is depressed in SelectionsChanging. This thread has a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=32170


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