Domanda

I created a data bound listview in a Windows 8 HTML5/JavaScript app, I would like to modify the data bound to the clicked cell. For this I am using the ListView.oniteminvoked event.

The data is successfully modified, but the cell does not refresh.

The documentation says I should probably use "msSetImmediate", but I cannot understand how.

How to refresh the single cell? Could you provide me an example in which once clicked, the cell changes its content based on the modified data?

È stato utile?

Soluzione

Problem (somehow) solved:

eventObject.detail.itemPromise.done(function (invokedItem) {
    DataExample.data[invokedItem.index] = { newobject }
    dataList.setAt(invokedItem.index, { newobject });
});

Alas, setAt - although actually refreshes the cell contents - does not seem to modify the data array used to create the dataList, hence I am updating it manually before.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top