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.

BUG? ReadOnly

Thread ID:





20206 Oct 12,2004 09:50 AM Oct 13,2004 05:11 PM Windows Forms 2
Tags: Grouping
Dominic Morris
Asked On October 12, 2004 09:50 AM

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".

Dominic Morris
Replied On 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". > >

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


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.