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.

splittercontrol issue

Thread ID:

Created:

Updated:

Platform:

Replies:

96560 Sep 20,2010 10:42 AM Nov 2,2010 12:18 AM Windows Forms 7
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 20, 2010 10:42 AM

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)?

v/r
Jan



Christopher Issac Sunder K [Syncfusion]
Replied On October 4, 2010 09:13 AM

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);
}
//Caption
else if (style.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Caption)
{
this.ContextMenuStrip2.Show(e.TableControl, pt);

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

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


}
}


Sample for your reference:

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GGCMenu-348734224.zip

Please let me know if this helps.

Regards,
Christo.


Administrator [Syncfusion]
Replied On October 4, 2010 11:21 AM

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?

v/r
Jan


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

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.

Regards,
Jisha




GCSplitter_3cf8fbf7.zip

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

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.



example_17c0a6a5.zip

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

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.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=example-438973444.zip

Please let me know if you have any other concerns.

Regards,
Christo.



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

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 12:18 AM

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.

Regards,
Arulraj.A


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.

;