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

Thread ID:





58833 Mar 29,2007 12:23 PM UTC Apr 3,2007 12:11 PM UTC WinForms 2
Tags: GridControl
Asked On March 29, 2007 12:23 PM UTC


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 05:21 PM UTC

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


Replied On April 3, 2007 12:11 PM UTC

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


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

or the page will be automatically redirected to 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