IListDataAdapter.change() discards groupKey RRS feed

  • Question

  • I'm working on a grouped ListView / Grid with two virtualized data sources (one for items and one for Groups). Individually, these data sources work fine and can read & write data via JSON.

    However, when I Change an item in this grouped listView, the app terminates with an exception claiming that "The key must be a string.". I spent some time in the Debugger and tracked this issue down to line 8349 in ui.js:

    return new Promise(function (complete, error) {

    var itemOld;               


    // applyEdit                   

    function () {                       

    return listDataAdapter.change(key, newData, adjustedIndex(slot)); 


    EditType.change, complete, error,

                        // keyUpdate                   


    // updateSlots                   

    function () {

                            itemOld = slot.item;                       

    slot.itemNew = {

                                key: key,                           

    data: newData                       


    if (itemOld) {                           


    } else {                           


    }                    },                   

    // undo                   

    function () {                       

    if (itemOld) {

                                slot.itemNew = itemOld;                           


    } else {                           






    As you can see, a new item is created on the fly with the key and data properties but without a groupKey property, even though itemOld had a groupKey assigned at that point.

    This Problem occurs even if my data Adapter's Change method just Returns WinJS.Promise.wrap(null) without making any changes at all.

    How can I work around this?

    • Edited by Akinzekeel Wednesday, October 31, 2012 4:14 PM
    Wednesday, October 31, 2012 4:12 PM