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

attempt to right-click on a column header to display a context menu sorts the ggc instead

Thread ID:





55153 Jan 24,2007 02:56 PM UTC Jan 25,2007 09:33 AM UTC WinForms 1
Tags: Grouping
James Blibo
Asked On January 24, 2007 02:56 PM UTC

I would like to right click on the ggc column header to display a context menu to execute a command. However, right-clicking on the column header sorts the column instead. How can I make only left-click sorts the ggc and right click display a context menu.

Administrator [Syncfusion]
Replied On January 25, 2007 09:33 AM UTC

Hi James,

Thank you for being patience.

Please try using the following code snippet to achieve the intend behavior. This can be achieved by handling the TableControlCellMouseDown event. In the event, the context menu is shown on right click.

//this.gridGroupingControl1.TableControlCellMouseDown += new GridTableControlCellMouseEventHandler(gridGroupingControl1_TableControlCellMouseDown);
void gridGroupingControl1_TableControlCellMouseDown(object sender, GridTableControlCellMouseEventArgs e)
GridTableCellStyleInfo style = e.TableControl.Table.TableModel[e.Inner.RowIndex, e.Inner.ColIndex];
if (style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell)
if (e.Inner.MouseEventArgs.Button == MouseButtons.Right)
{ menu.Show(this.gridGroupingControl1, e.Inner.MouseEventArgs.Location);
e.Inner.Cancel = true;

Kindly let us know if you need any further assistance.
Have a nice day.

Best regards,


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