Faizan
Faizan

Reputation: 1142

I want to refresh Telerik kendoMobileListView on button click

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>

Upvotes: 1

Views: 358

Answers (2)

Rian Geofandy
Rian Geofandy

Reputation: 56

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.

Upvotes: 2

Faizan
Faizan

Reputation: 1142

it is working I am using this

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

Upvotes: 2

Related Questions