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.
Unfortunately, activation email could not send to your email. Please try again.

context menus

Thread ID:

Created:

Updated:

Platform:

Replies:

16401 Jul 14,2004 12:30 PM Jul 14,2004 12:51 PM Windows Forms 1
loading
Tags: GridControl
Philip Bishop
Asked On July 14, 2004 12:30 PM

I have this code that i got from clay that will get rid of context menus on the grids. It only seems to work for grids with currency cells. If I try to change this code to work on OriginalTextBox cells it blows up. Is there a way u can turn off the right click menu for the grid in general regardless of if columns have diff cell types??? Dim c As Control = Me.grdInitCredInv.CellRenderers("Currency").Control c.ContextMenu = New ContextMenu

Administrator [Syncfusion]
Replied On July 14, 2004 12:51 PM

If you want every control in teh grid to have an empty contextmenu, you could try subscribing to the grid.ControlAdded event and setting the context menus there. this.gridControl1.ControlAdded += new ControlEventHandler(gridControl1_ControlAdded);
private void gridControl1_ControlAdded(object sender, ControlEventArgs e)
{
	e.Control.ContextMenu = new ContextMenu();
}

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.

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.

;