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. Image for the cookie policy date
close icon

How to prevent loss of selected cells on RMB click

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

2 Replies

HA haneefm Syncfusion Team 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

Regards,
Haneef


PR Prashant April 3, 2007 12:11 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon