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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

context menu

Thread ID:

Created:

Updated:

Platform:

Replies:

103044 Mar 26,2012 07:36 PM UTC Apr 10,2012 05:11 AM UTC ASP.NET Web Forms (Classic) 2
loading
Tags: GridGroupingControl
Smitha
Asked On March 26, 2012 07:36 PM UTC

Hi,
I am trying to add a context sensitive menu for a windows forms with a grid control.
So I've used a context menu and added it.
But the context menu doesn't disappear even after selecting my option.
How can i set it that the context menu disappears after right click?

Thanks
Smitha


Mercy C [Syncfusion]
Replied On April 10, 2012 05:09 AM UTC

Hi Smitha,

Thanks for your interest in Syncfusion products.

You can handle "CellClick" event to display the context menu when right mouse button is clicked.

void gridControl1_CellClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e)
{
if (e.RowIndex >= 2 && e.MouseEventArgs.Button == MouseButtons.Right)
{
this.contextMenuStrip1.Show(this.gridControl1, e.MouseEventArgs.Location);
}
}

Please refer to the sample in the following link
http://www.syncfusion.com/downloads/Support/DirectTrac/93095/WindowsFormsApplication81868417365.zip

Please let me know if you have any concerns.

Regards,
Mercy.C


Ragamathulla B [Syncfusion]
Replied On April 10, 2012 05:11 AM UTC

Hi Smitha,

Thank you for your interest in syncfusion products,

You can have context menu on right click on column headers by using ‘TableControlCellClick’ event along with the following code. Please refer the following code to achieve the behavior.

Sample link:

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=847071641385806.zip

Let me know if you have any further concerns.

Regards,
Ragamathullah B.


CONFIRMATION

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.

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

;