replace

Replaces the contents of the listview with the passed rendered data items.

Parameters

dataItems Array

Example

<div data-role="view">
    <a data-role="button" data-click="replaceItem">Replace item</a>
    <ul id="listview" data-role="listview" data-template="foo">
    </ul>
</div>

<script type="text/x-kendo-template" id="foo">
Item #: idx #
</script>

<script>
var i = 0;
function replaceItem() {
  i ++;
  $("#listview").data("kendoMobileListView").replace([ { idx: i } ]);
}

new kendo.mobile.Application();
</script>
In this article