AD
Administrator
Syncfusion Team
February 2, 2007 08:58 PM UTC
Hi James,
Thanks for being patience.
This can be achieved by handling the TableControlMouseDown event and accordingly showing the context menu popup on the respective co-ordinates.
In the following code snippet, the TableControlMouseDown event is handled and context menu is shown only for the RecordFieldCell
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
private void gridGroupingControl1_TableControlMouseDown(object sender, GridTableControlMouseEventArgs e)
{
GridTableCellStyleInfo styleinfo = e.TableControl.PointToTableCellStyle(new Point(e.Inner.X, e.Inner.Y));
if(e.Inner.Button == MouseButtons.Right && styleinfo.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell)
{
// show contextmenu1
this.contextMenu1.Show(this.gridGroupingControl1, this.gridGroupingControl1.PointToClient(Control.MousePosition));
}
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Sample:
http://www.syncfusion.com/Support/user/uploads/ContextMenu_GGC_b6135ab.zip
Kindly let us know if you need any further assistance.
Have a nice day.
Best regards,
Madhan