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.

ContextMenuStrip in GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

31669 Jul 12,2005 09:56 AM Jul 13,2005 02:24 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On July 12, 2005 09:56 AM

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

Administrator [Syncfusion]
Replied On July 12, 2005 02:24 PM

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.

Administrator [Syncfusion]
Replied On July 13, 2005 02:24 AM

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

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.

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.

;