We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

context menu

Thread ID:





29642 May 31,2005 08:30 AM UTC May 31,2005 08:45 AM UTC WinForms 2
Tags: GridControl
Catinat Velmourougan
Asked On May 31, 2005 08:30 AM UTC

hi I want the context menu to appear only when I right click on the row header and not on the col header or inside any cell.How to do it? regards, catinat

Catinat Velmourougan
Replied On May 31, 2005 08:41 AM UTC

hi I dont know why people who post later than me get replies faster? Clay can you look into my queries also? regards, catinat

Administrator [Syncfusion]
Replied On May 31, 2005 08:45 AM UTC

What grid are you using? Here is code for a GridDataBoundGrid. The code for a GridControl would be similar.
private void gridDataBoundGrid1_MouseUp(object sender, MouseEventArgs e)
	Point pt = new Point(e.X, e.Y);
	int row, col;
	if(e.Button == MouseButtons.Right
		&& this.gridDataBoundGrid1.PointToRowCol(pt, out row, out col)
		&& col <= this.gridDataBoundGrid1.Model.Cols.HeaderCount
		&& row > 0)
		this.contextMenu1.Show(this.gridDataBoundGrid1, pt);


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon