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

Need to process row selection on a right mouse button click popup menu item processing

Thread ID:





48452 Aug 28,2006 04:13 PM UTC Aug 29,2006 09:40 AM UTC WinForms 2
Tags: GridControl
Konstantin Babiy
Asked On August 28, 2006 04:13 PM UTC

I have a range of rows selected. Pressing with a RMB on this range causes resetting my selection BEFORE processing TableControlCellClick. I need to somehow have this range when right mouse button pressing processes, when this range is already reset.
Haneef wrote me about _gridGrouping.TableControl.Model.Options.SelectCellsMouseButtonsMask property, which prevent the right button from affecting any selections,
BUT it also prevents TableControlCellClick rasing on right mose button click - so I just can''t have my RMB popup menu appear.
Any ideas how to solve this?

Administrator [Syncfusion]
Replied On August 28, 2006 11:06 PM UTC

Hi Kostya,

You can handle the TableControlMouseDown event instead of TableControlCellClick event and set the context menu on RightClick. The following code snippet demonstrates this technique.

//this.gridGroupingControl1.TableControlMouseDown += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlMouseEventHandler(gridGroupingControl1_TableControlMouseDown);
void gridGroupingControl1_TableControlMouseDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlMouseEventArgs e)
if(e.Inner.Button == MouseButtons.Right)
this.contextMenuStrip1.Show(this.gridGroupingControl1, this.gridGroupingControl1.PointToClient(Control.MousePosition));

Best regards,

Konstantin Babiy
Replied On August 29, 2006 09:40 AM UTC

Thank you, Madhan, you helped me so much!


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

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