HA
haneefm
Syncfusion Team
April 4, 2007 03:43 PM UTC
Hi Thomas,
Here is code that catches a mousedown event and tests to see if it is a right-click on a header.
private void gridDataBoundGrid1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(e.Button == MouseButtons.Right)
{
Point clickPoint = gridDataBoundGrid1.PointToClient(Cursor.Position);
int rowIndex, colIndex;
gridDataBoundGrid1.PointToRowCol(clickPoint, out rowIndex, out colIndex);
if(rowIndex == 0 && colIndex > 0)
MessageBox.Show("gridDataBoundGrid1_MouseDown");
}
}
Best regards,
Haneef