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

Multi Row Right click - Context Menu

I am using version 3.3 in virtual grid mode.

I have a context menu. I show this menu on the

_HPGrid_MouseDown event, if e.Button == MouseButtons.Right.

When i select multiple rows and right click, the grid hightlight changes to ONLY highlight the row where my mouse in on instead of keeping all the rows highlight that were initally selected.

If you do this in Excel, it keeps all the rows selected (and allows you to do functions on the entire range).

Why is it changing the focus?

Do you have sample code to show this working in a mode where all the rows stay highlighted.

I want to add Right click context menu event that will perform actions on multiple rows.

thks,
ak

1 Reply

AD Administrator Syncfusion Team October 17, 2006 04:35 AM UTC

Hi Adam,

Please set the following property to control the behavior of mousebuttons selecting cells.

this.gridControl1.Model.Options.SelectCellsMouseButtonsMask = MouseButtons.Left;

This will prevent the right button from affecting any selections.

For details, refer the following KB article
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=348

Let me know if this is not what you wanted.

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon