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.

Implementing Right Click & Copy Selected Cells Functionality

Thread ID:

Created:

Updated:

Platform:

Replies:

10998 Feb 19,2004 05:52 AM Feb 19,2004 06:54 AM Windows Forms 2
loading
Tags: GridControl
John Bowm
Asked On February 19, 2004 05:52 AM

Hi, I''ve got a grid control that implements the OnMouseDown event handler that checks for left click & number of clicks and then does the behavior I want. However, I''m trying to also implement a context menu when the user right clicks (to copy selected data to the clipboard). This is all fine except for the fact that, if the user selects (using the left mouse button, for example) a range of cells or rows, then uses the right mouse button to click on the selected cells to get the context menu, when the OnMouseDown event is entered, the selected cells are already changed to the item they''ve right clicked on. How can I stop this "unselecting" type of behavior? Is there some event prior to the OnMouseDown that is firing that I need to do something in? TIA

Administrator [Syncfusion]
Replied On February 19, 2004 06:18 AM

There is a property that controls this behavior of which mousebutton can select cells. Try: this.gridControl1.Model.Options.SelectCellsMouseButtonsMask = MouseButtons.Left; This should prevent the right button from affecting any selections.

John Bowm
Replied On February 19, 2004 06:54 AM

Clay, That appears to do the trick, thanks for the help! John

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.

;