Bug Report B142978
Visible to All Users

A grid's context menu isn't closed when clicking outside the menu

created 15 years ago

Hello,
In grid, I was trying to achieve Right-Click selection of row and assigning menus to it. Since, there is no direct option for Right-Click selection, I used your workaround to capture MouseDown event and make the FocusedRowHandle to row which is selected in right-click. I also have assigned some menus to Rows. So, what I wanted to achieve was when I do right-click on some row, it should first get selected and then the menus should appear. However what is happening that in first right-click on any row, it's happening correctly but in second click (selecting another row) menu appears first and row doesn't get selected. Interestingly, when I right-click on third row then menus appear there and the row, which I had second clicked was getting selected. And it was going on as it is, selecting the previous row in next click.
So, please provide some solution or workaround. I'm also doing some operation on Focused Row Changed event, which can take some time. So, the given workaround on right-click should first select the row, perform the operations on FocusedRowChanged event and then should show the menu. (Even if the menu appears first and then FocusedRowChanged is triggered would be fine).

Show previous comments (10)
DevExpress Support Team 15 years ago

    Hello,
    I'm awaiting your video. I've attached my own, based on your sample.
    Thank you, Marina

      Hi,
      I have attached the video and sample project where the problem is getting reproduced.
      The file "2010_01_19_12_41_09.zip" is the video and "ColumnChooserDemo.zip" is the sample project in the attached file "MenuProblems.zip"
      I just came to know that it's not only the Right-Click grid menus but even the Column menus are floating around. Also, even if I minimize the application this window remains floating around.
      The other observation is that when I tried grid in Window application, it was working fine but in my case where I have embedded it in Windows form control and then in excel custom task pane, it's not working. Kindly have a look at it.
      Thanks,
      Sushant.

      DevExpress Support Team 15 years ago

        Hello,
        I've reproduced this issue on your sample. I see that the problem is that you use our grid in an excel add-in. We'll do our best to fix this issue.
        Thank you, Marina

        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.