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. Image for the cookie policy date

context menus

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

1 Reply

AD Administrator Syncfusion Team July 14, 2004 04:51 PM UTC

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();
}

Loader.
Live Chat Icon For mobile
Up arrow icon