Hi,
This can be achieved by handling the TableControl.MouseUp event and check for ColumnHeader cells.
Please refer the code:
this.gridGroupingControl1.TableControl.MouseUp += new MouseEventHandler(TableControl_MouseUp);
void TableControl_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
GridTableControl tableControl = sender as GridTableControl;
GridTableCellStyleInfo style = (GridTableCellStyleInfo)tableControl.PointToTableCellStyle(new Point(e.X, e.Y));
Point pt = tableControl.PointToClient(Control.MousePosition);
if (style.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.ColumnHeader)
{
this.contextMenuStrip1.Show(tableControl, pt);
}
}
}
Also Please refer the following forum thread that for more information:
http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=73262Regards,
Jisha