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.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

48452 Aug 28,2006 12:13 PM Aug 29,2006 05:40 AM Windows Forms 2
loading
Tags: GridControl
Konstantin Babiy
Asked On August 28, 2006 12:13 PM

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 07:06 PM

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,
Madhan

Konstantin Babiy
Replied On August 29, 2006 05:40 AM

Thank you, Madhan, you helped me so much!

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.

;