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.

Cell Selection & Right Click

Thread ID:

Created:

Updated:

Platform:

Replies:

35478 Sep 30,2005 03:48 PM Sep 30,2005 11:46 PM Windows Forms 1
loading
Tags: GridControl
Clinton Nielsen
Asked On September 30, 2005 03:48 PM

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 September 30, 2005 11:46 PM

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

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.

;