I want to refresh Telerik kendoMobileListView on button click

359 views Asked by At

Actually I have a refresh button after listview, I want to refresh kendoMobileListView every time when user click on that button.. How can I refresh the kendo list?

<ul id="cart-products" data-role="listview" data-pull-to-refresh="true" data-messages='{ "refreshTemplate": "Refreshing!" }'  data-source="CartData" data-template="cart-template"></ul>
2

There are 2 answers

0
Faizan On BEST ANSWER

it is working I am using this

$(document).on("click", ".remove-product", function () {
    $("#cart-products").data("kendoMobileListView").dataSource.read();
    $("#cart-products").data("kendoMobileListView").refresh();
});
0
Rian Geofandy On

If you are using:

var CartData = new kendo.data.DataSource({
    transport: {        
        read: function(options) {
            <your code>
        }
    }
});

for your data-source. You can use CartData.read() on your click button.