Flexgrid context menu shows up in ListBox selection mode

Posted by: stefan.gross on 21 January 2021, 12:57 am EST

    • Post Options:
    • Link

    Posted 21 January 2021, 12:57 am EST

    In our Angular app we need to use the ListBox selection mode to select non-contiguous ranges of rows.

    This kind of selection requires the use of the ctrl key.

    But when clicking a row with pressed control key, the context menu shows up, which is not the intended behavior.

    Expected behavior:

    • right mouse button click shows context menu
    • control click extends selection but does not show context menu

    I assume this a bug? How can we achieve the expected behavior?

    Tried with latest Wijmo version 5.20203.766

    Thanks

    Stefan

  • Posted 21 January 2021, 9:10 pm EST

    Hi Stefan,

    We are sorry but we were unable to replicate your issue at our end. Please refer to the demo link below which we used to replicate the issue and the gif attached:

    https://www.grapecity.com/wijmo/demos/Grid/Selection/Overview/angular

    Can you let us know whether we are missing something in order to replicate your issue?

    Also, are you using some kind of custom context menu?

    Regards,

    Ashwin

  • Posted 26 January 2021, 5:09 am EST

    Hi Ashwin,

    I defined a context menu on the grid like this:

     
    <wj-menu #contextMenu class="ui-widget"
               style="display:none" [header]="'Context Menu'" [selectedValuePath]="'value'"
               (itemClicked)="contextMenuClicked(contextMenu)" >
        <wj-menu-item [value]="'Duplicate'">
          Duplicate Part
      </wj-menu>
    <!-- further config of grid omitted here -->
    <wj-flex-grid #grid
                    [selectionMode]="'ListBox'"
                    [wjContextMenu]="contextMenu"
      >
    ...
    
    

    Then, when selecting say row 1,2 and 5 when selecting row 5 with ctrl-click, the context menu shows up.

    Thanks

    Stefan

  • Posted 26 January 2021, 5:13 am EST - Updated 3 October 2022, 5:38 am EST

    Screenshot for explanation

  • Posted 26 January 2021, 6:52 pm EST

    Hi Stefan,

    Sorry, but I was still not able to replicate the issue even with wjContextMenu. It is possible that maybe the menu is displayed due to some other event. Can you please modify the sample below so that it replicates your issue?

    https://stackblitz.com/edit/angular-9-0-0-rc-1-zlyeap

    ~regards

  • Posted 29 January 2021, 4:16 am EST

    Thanks for the hint with the other event. Now every works as expected!

    In my opinion, after having tried many grid components, FlexGrid is the best available grid component for Angular in the market.

    Cheers

    Stefan

  • Posted 31 January 2021, 2:04 pm EST

    Hi Stefan,

    We really appreciate your feedback :slight_smile:

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels