Ticket T1145381
Visible to All Users

Context Menu Strip no longer working as previously in WinForms 22.2.4

created 2 years ago

Hello,

I have a previously setup context menu strip which is working fine still after using the project converter to 22.2.4. However I've noticed that a property on the grid control has moved? I found a section under embedded navigation to pair a CMS to but this was blank for my old user control it showed (none).

I setup my new control assigning the CMS to the ContextMenuStrip property (but it didn't work):
Clipboard-File-4.png

On testing the old control works and the CMS opens even through the Embedded Navigator property was blank(none).
Clipboard-File-1.png

I then did a comparison looking at both designer files to see if there were any differences between the new and old designer.cs files:
Clipboard-File-2.png
There was no difference.

I set an event up for CMS opening but it's never hit.
Clipboard-File-3.png

hoping to get some assistance please

Answers approved by DevExpress Support

created 2 years ago

Hello Alex,

We hid this property because our controls have their own mechanism of showing context menus, which conflicts with default ContextMenuStrip. Our customers who used this property encountered unexpected behavior.

If you need to implement a custom menu or modify our existing GridControl menu, use the PopupMenuShowing event. Please refer to the following help topics for more details:
DevExpress WinForms Cheat Sheets - Context Menus
How to: Implement Custom Menu in XtraGrid Control

While it is still possible to use the ContextMenuStrip property directly in code, we cannot guarantee that this will work as expected in all usage scenarios.

Should you have further questions, please let me know.

    Comments (2)

      Thanks for the response Igor.

      It was easy enough to implement though I do miss the designer window to select images etc.
      Going to provide a SC of my code in case it assists anyone else who used to use the designer to set up CMS.

      The gridview event PopupMenuShowing was subscribed to via the designer.

      Clipboard-File-2.png

      DevExpress Support Team 2 years ago

        Hello Alex,

        I am happy to hear that you found a solution. Thank you for letting us know of your progress and for sharing your solution.

        Please feel free to contact us if you have any questions.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.