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.

MaskEdit context menu

Thread ID:

Created:

Updated:

Platform:

Replies:

15859 Jun 29,2004 07:19 AM Jun 29,2004 08:35 AM Windows Forms 2
loading
Tags: GridControl
Patrick Beaulieu
Asked On June 29, 2004 07:19 AM

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

Administrator [Syncfusion]
Replied On 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;
}

Patrick Beaulieu
Replied On 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

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.

;