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

BUG? ReadOnly

when this.gridGroupingControl1.TableModel.ReadOnly = true; then i can still right-click in cells (Type="Currency") and select "Delete" from the context menu. seems like strange behaviour for "by design".

2 Replies

DM Dominic Morris October 12, 2004 10:07 AM

NOTE: that setting ReadOnly explicity on the column in question, also does not work: this.gridGroupingControl1.TableDescriptor.Columns[ 3 ].Appearance.AnyRecordFieldCell.ReadOnly = true; The Currency cells can be still be deleted from, cut from and pasted into. >when >this.gridGroupingControl1.TableModel.ReadOnly = true; > >then i can still right-click in cells (Type="Currency") and select "Delete" from the context menu. > >seems like strange behaviour for "by design". > >


AD Administrator Syncfusion Team October 13, 2004 05:11 PM

This menu is from the embedded CurrencyEdit control in the cell. If you do not want to see it (or if you want to modify it), you can handle the TableControlCurrentCellControlGotFocus event. Here is code that will simply hide this menu to avoid these problems.
private void gridGroupingControl1_TableControlCurrentCellControlGotFocus(object sender, GridTableControlControlEventArgs e)
{
	if(e.Inner.Control is GridCurrencyTextBox )
	{
		if(e.Inner.Control.ContextMenu.MenuItems.Count > 0)
			e.Inner.Control.ContextMenu = new ContextMenu();
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon