locked
Setting ListView.currentItem

    Question

  • Hello, all. I'm writing an app in HTML5/Javascript and I'm having trouble updating the currentItem in a listview. After updating the data source to this particular list view I get the following error:

    SCRIPT5022: Unhandled exception at line 10711, column 13 in ms-appx://microsoft.winjs.1.0/js/ui.js
    0x800a139e - JavaScript runtime error: WinJS.UI.ItemsManager.ItemIsInvalid: Invalid argument: item must be a DOM element that was returned by the Items Manager, and has not been replaced or released.
    File: ui.js, Line: 10711, Column: 13

    This is the code throwing the exception:

    itemsListview.currentItem.key = selectedItem;

    What am I missing here?

    Monday, November 12, 2012 1:32 AM

Answers

All replies