locked
ListView right click not selecting? RRS feed

  • Question

  • Hi,

    I have a ListView that I can only select items using Control-Click but in some of the examples I can select items with right-click. I can't figure out how to enable this in my app. I'm defining my ListView like this:

    <div id="basicListView" data-win-control="WinJS.UI.ListView" 
                    data-win-options="{itemDataSource : DataExample.itemList.dataSource, 
                        itemTemplate: select('#mediumListIconTextTemplate'),
                        selectionMode: 'single', 
                        tapBehavior: 'invoke', 
                        swipeBehavior: 'none', 
                        layout: {type: WinJS.UI.ListLayout}}">
     </div>

    Can anyone tell me how I can enable right-click for selecting items?

    Thanks, S

    Saturday, October 20, 2012 10:31 PM

Answers

  • Change your selectionMode property to be 'multi' instead of 'single' - that should allow you to right-click and select multiple items.
    Sunday, October 21, 2012 12:03 AM

All replies

  • Change your selectionMode property to be 'multi' instead of 'single' - that should allow you to right-click and select multiple items.
    Sunday, October 21, 2012 12:03 AM
  • Hi, thanks, however this didn't work for some reason. I still need to use Ctrl+Click to select items. Is there anything else I can check?

    Thanks.

    Monday, October 22, 2012 2:11 AM