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

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.

3 Replies

AD Administrator Syncfusion Team August 10, 2005 04: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;		}
	}
}


AD Administrator Syncfusion Team August 10, 2005 06: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.


AD Administrator Syncfusion Team August 10, 2005 08: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.

Loader.
Live Chat Icon For mobile
Up arrow icon