AD
Administrator
Syncfusion Team
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,
Madhan