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 prevent loss of selected cells on RMB click

Thread ID:

Created:

Updated:

Platform:

Replies:

58833 Mar 29,2007 08:23 AM Apr 3,2007 08:11 AM Windows Forms 2
loading
Tags: GridControl
Prashant
Asked On March 29, 2007 08:23 AM

Hi,

I am working on a grid and have provided a context menu support in the grid. But at present I am facing one problem that if the user select multiple cells and than right click with in the grid to invoke context menu than the selection get lost. Can you tell me if there is any flag or method with the help of which i can keep the selection intact (same as that in excel) on RMB (right mouse button) click.

Thanks and Regards
Prashant Agarwal

haneefm [Syncfusion]
Replied On March 29, 2007 01:21 PM

Hi Prashant,

There is an Options property setting that controls which mouse buttons select/unselect cells. The default is for either button to select/unselect cells. To only allow the left button to select/unselect cells, try:


//For GridControl/GridDatabound control:
this.grid.Model.Options.SelectCellsMouseButtonsMask = MouseButtons.Left;

//For GridGroupingGrid control:
this.gridGroupingControl1.TableControl.Model.Options.SelectCellsMouseButtonsMask = MouseButtons.Left;

Let me know if this helps

Regards,
Haneef

Prashant
Replied On April 3, 2007 08:11 AM

Thanks Haneef.
Thats what I was looking for and it did solved my problem.

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.

;