Ticket T573149
Visible to All Users

GridView PopupMenu instantly closing

created 7 years ago

Hi,

I need to sign some files using a certificate from a smart card.
I have a grid with the files and, using the PopupMenuShowing event, I show a button that let the user select the certificate, requires the pin and signs the focused file.

The problem is that, after the selection window is shown (using System.Cryptography methods), the popup menu starts behaving in a strange way. It pops up but instantly closes and stays opened only if a second right click is made on the same point/pixel.

I made a sample project to prove the issue. Open the form, right click on a cell of a grid and click the menu button.

While working on the sample project, I noticed that, without the ribbon, the menu behaves normally.

Is there something I can do to resolve the problem?

Answers approved by DevExpress Support

created 7 years ago (modified 7 years ago)

Hello Vlad,

Thank you for the project. When a native form is displayed in a .NET application, sometime it causes the issue when the same mouse messages are sent twice. To overcome this, call the static BarManagerHook.FilterMouseEvents method:

Visual Basic
DevExpress.XtraBars.MessageFilter.BarManagerHook.FilterMouseEvents()

Please try this solution and let me know if it works for you.

    Show previous comments (1)
    DevExpress Support Team 7 years ago

      Please accept my apologies for being not clear enough. When you call this method, it sets the internal AllowFilterMouseEvents property to True. Thus, it is sufficient to call this method once, e.g. in a form's constructor. Do not hesitate to contact me if you have additional questions.

        Even better then
        Thanks

        DevExpress Support Team 7 years ago

          You are welcome, Vlad.

          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.