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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top