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

MaskEdit context menu

Thread ID:





15859 Jun 29,2004 11:19 AM UTC Jun 29,2004 12:35 PM UTC WinForms 2
Tags: GridControl
Patrick Beaulieu
Asked On June 29, 2004 11:19 AM UTC

Hi I’m using the version 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

Administrator [Syncfusion]
Replied On June 29, 2004 12:16 PM UTC

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;

Patrick Beaulieu
Replied On June 29, 2004 12:35 PM UTC

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


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

Live Chat Icon For mobile
Live Chat Icon