The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I''d like to have a different context menu for the column headers than for the rest of the grid. Is there a way this can be achieved using essential studio?
Thanks,
Nick
ADAdministrator 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.