Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top