I have a datasource which could have any number of items, therefore the total of items will be unknown. I would like to have a maximum of 10 items per page and would ideally like to scroll through these items using the endless scroll feature. However, the endless scroll will continue to loop through the datasource items when the last item has been reached.
I would like to use the endless scroll feature until the last item has been displayed and then this stops. I will therefore need to perform a check and stop returning records after all items have been requested. The problem is, I have no idea where to start with implementing this. I am using PHP. Can anyone advise?
I assume I need to use the serverPaging and page attributes that are in the documentation but this does not give any examples that help.
I would like to use the endless scroll feature until the last item has been displayed and then this stops. I will therefore need to perform a check and stop returning records after all items have been requested. The problem is, I have no idea where to start with implementing this. I am using PHP. Can anyone advise?
var DataSource = new kendo.data.DataSource({
pageSize: 10,
transport: {
read: "data.php",
dataType: "json",
}
sort: { field: "created", dir: "desc" },
});
$("#list").kendoMobileListView({
dataSource: DataSource,
pullToRefresh: true,
appendOnRefresh: false,
endlessScroll: true,
scrollTreshold: 30, //treshold in pixels
style: "inset",
template: $("#list").text()
});
I assume I need to use the serverPaging and page attributes that are in the documentation but this does not give any examples that help.