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.
Syncfusion Feedback

MaskEdit

Thread ID:

Created:

Updated:

Platform:

Replies:

32922 Aug 10,2005 04:46 AM Aug 10,2005 09:26 AM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 10, 2005 04:46 AM

I am setting the celltype for a cell in gridcontrol to maskedit. But it adds menu items such as cut,copy,paste etc in the context menu that is displayed when i right click on the cell. Is it possible to hide them in the menu such as setting visible to false or something like that. Bcoz i am i customizing the grid by adding some menu items and these menu items also appear.

Administrator [Syncfusion]
Replied On August 10, 2005 05:34 AM

That menu takes a little effort to get at. But you can handle CurrentCellControlGotFocus and explicitly set it there. If you want the menu to be your menu, then just it as below. If you want the menu to be empty, create an empty menu, and set c.ContextMenu to be that empty menu.
private void gridControl1_CurrentCellControlGotFocus(object sender, ControlEventArgs e)
{
	foreach(Control c in this.gridControl1.Controls)
	{
		if(c is GridMaskedEditBox)
		{
			c.ContextMenu = myContextMenu;		}
	}
}

Administrator [Syncfusion]
Replied On August 10, 2005 07:14 AM

Also I am setting the gridcontrol.ActivateCurrentCellBehavior = GridCellActivateAction.DblClickOnCell But for MaskEdit type cells, i am not getting the cursor in the cell even if i am double clicking on the cell. But if i enter text i am getting the cursor.

Administrator [Syncfusion]
Replied On August 10, 2005 09:26 AM

What versoion of our library are you using? If I set to activate on double click in our latest code, the mask edit cell does show the cursor when you double click it. If you are using a earlier version, then you may have to handle a double click event and explicitly call grid.CurrentCell.BeginEdit to see the cursor.

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.

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

;