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
close icon

ContextMenuStrip in GridControl

Hi, Clay! If I put an editable GridControl on a form and handle its CurrentCellControlGotFocus event, the TextBoxControl''s ContextMenu (e.Control.ContextMenu) is an empty ContextMenu object instead of null (set by GridTextBoxControl.OnGotFocus() method. WHY???). This is a problem as ContextMenu takes precedence over the ContextMenuStrip property (as written in MSDN "Control.ContextMenuStrip Property", Remarks section) and I want to use that also if the current cell is being edited. (I put up my ContextMenuStrip in the OnCurrentCellStartEditing override of my derived GridControl).

2 Replies

AD Administrator Syncfusion Team July 12, 2005 06:24 PM UTC

The default contect menu of the cell controls will vary depending upon the actual control. Have you tried setting e.Control.ContextMenu = null in OnCurrentCellGotFocus to see if that gives you what you need. If not, then you could loop through teh grid.CelRenderer''s class in Form.Load and set cellRenderer.Control.ContextMenu = null for any or all of the cell controls at that point as well.


AD Administrator Syncfusion Team July 13, 2005 06:24 AM UTC

That''s exactly what I did and it worx. Thanx.

Loader.
Live Chat Icon For mobile
Up arrow icon