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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ContextMenuStrip in GridControl

Thread ID:





31669 Jul 12,2005 01:56 PM UTC Jul 13,2005 06:24 AM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On July 12, 2005 01:56 PM UTC

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

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

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


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon