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

MaskEdit context menu

Hi I’m using the version 1.6.1.5 of the grid. I have change the cell Type of a cell to mask Edit. Then when I right click on the cell the context menu is showed as ctrl-x, ctrl-c, and ctrl-v instead of cut, copy and paste. I tried to trap the click event of the grid, but when the text is selected I right click and it doesn’t fire the event. Thanks Pat

2 Replies

AD Administrator Syncfusion Team June 29, 2004 08:16 AM

You do nott see this special menu in the 2.0 code base. In 1615, I was able to get the default menu by handling the CurrentCellControlGotFocus, and setting the ContextMenu null there so the default menu would be used.
private void gridControl1_CurrentCellControlGotFocus(object sender, ControlEventArgs e)
{
	if(e.Control.ContextMenu != null && e.Control is GridMaskedEditBox)
		e.Control.ContextMenu = null;
}


PB Patrick Beaulieu June 29, 2004 08:35 AM

Thanks Clay it worked just fine. I forgot to tell that I was coding in VB but it''s ok, I translate the code. So there''s the code in VB Private Sub grid_CurrentCellControlGotFocus(ByVal sender As Object, ByVal e As System.Windows.Forms.ControlEventArgs) Handles grid.CurrentCellControlGotFocus If e.Control.GetType Is GetType(GridMaskedEditBox) Then e.Control.ContextMenu = Nothing End If End Sub Pat

Loader.
Live Chat Icon For mobile
Up arrow icon