AD
Administrator
Syncfusion Team
May 26, 2006 03:19 AM UTC
Hi Nick,
A different context menu for the column headers can be popped up by handling the gridControl1.MouseDown event and there by checking the row index and then showing the context menu. Below is a code snippet.
private void gridControl1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(e.Button == MouseButtons.Right)
{
int row, col;
Point pt = new Point(e.X, e.Y);
if(gridControl1.PointToRowCol(pt, out row, out col, -1))
{
if(row == 0)
contextMenu2.Show(this.gridControl1,new Point(e.X,e.Y));
}
}
}
Regards,
Calvin.