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

splittercontrol issue

Thread ID:





96560 Sep 20,2010 02:42 PM UTC Nov 2,2010 04:18 AM UTC WinForms 7
Tags: GridControl
Administrator [Syncfusion]
Asked On September 20, 2010 02:42 PM UTC

When using a splitterControl with a gridControl inside, my contextmenu is only raised when I am clicking in the top left panel (with the grid split into different panels). How do I get the other panels to quit blocking the context menu (and any other events that may be getting blocked that I am unaware of)?


Christopher Issac Sunder K [Syncfusion]
Replied On October 4, 2010 01:13 PM UTC

Hi Jan,

Thank you for your interest in Syncfusion products. You could achieve the desired behavior by handling the MouseDown event. This will allow us to display contextmenu on right clicking on the grid cells by checking the e.Inner.Button property. Sample also shows how to display different context menu on different parts of the grid.

if (e.Inner.Button == System.Windows.Forms.MouseButtons.Right)
int row = 0;
int col = 0;
Point pt = new Point(e.Inner.X, e.Inner.Y);
e.TableControl.PointToRowCol(pt, out row, out col);

GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(row, col);

if (style.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.ColumnHeader)
this.ContextMenuStrip1.Show(e.TableControl, pt);
else if (style.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Caption)
this.ContextMenuStrip2.Show(e.TableControl, pt);

else if (style.TableCellIdentity.ColIndex == 0)
this.ContextMenuStrip3.Show(e.TableControl, pt);

else if (style.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record)
this.ContextMenuStrip4.Show(e.TableControl, pt);


Sample for your reference:


Please let me know if this helps.


Administrator [Syncfusion]
Replied On October 4, 2010 03:21 PM UTC

Did you read my post first?

1. I am using a GridControl, not a GridGroupingControl.
2. The issue relates to a GridControl hosted inside a SplitterControl.

Your example has neither a GridControl nor a SplitterControl, and the MouseEventArgs structure associated with a GridControl does not have an "Inner" property, nor a "TableControl" property.

Do you have an idea why the SplitterControl blocks the GridControl from raising a ContextMenu when right-clicking in any panel other than the top left panel of the SplitterControl?


Jisha Joy [Syncfusion]
Replied On October 12, 2010 06:27 AM UTC

Hi Jan,

I regret for the inconveninece caused.

I have tested the issue in the following attached sample. The contextmenu is showing propertly on right clicking on the gridcontrols placed in the splittercontrol.

Could you please try reproducing it in the attached sample or send us the reproducing steps so that we could sort out the cause of the issue and provide you a solution?.

Kindly let me know if you have any questions.



Administrator [Syncfusion]
Replied On October 12, 2010 04:42 PM UTC

You are not using a SplitterControl (the Syncfusion widget) in your example. You are using a SplitContainer (the Microsoft widget). See the attached example project for an illustration of the problem.


Christopher Issac Sunder K [Syncfusion]
Replied On October 21, 2010 04:47 PM UTC

Hi Jan,

We regret for the inconvenience and delay in getting back to you.

I am able to see the reported behavior in ContextMenuStrip when splitterControl is enabled in GridControl. The other parts of the GridControl doesn’t invoke the ContextMenuStrip because you haven’t assign the SplitterControl’s ContextMenuStrip property to ‘contextMenuStripEx1’.

this.gridControl1.ContextMenuStrip = this.contextMenuStripEx1;
this.splitterControl1.ContextMenuStrip = this.contextMenuStripEx1;//set this code too

Please refer the modified sample which illustrates the same.


Please let me know if you have any other concerns.


Administrator [Syncfusion]
Replied On October 22, 2010 04:43 PM UTC

Thank you. That fixed the problem.

Is the need to assign the context menu to the splitter control in the documentation? I didn't see it. Oh, well... At least it's fixed now.

Arulraj A [Syncfusion]
Replied On November 2, 2010 04:18 AM UTC

Hi Jan,

Thanks for the update.

We feel happy that your problem has been solved. Please do get back to us if you have any concerns and we will be happy to help you.



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