I have a kendo listview that is bound to a datasource. When the user clicks an Add button I call $("#arealistview").data("kendoMobileListView").prepend([newItem])
, which adds a new item to the beginning of the list.
How can I get a count of the items in the listview?
The total method of the data source should return that:
var total = $("#arealistview").data("kendoMobileListView").dataSource.total();
Or you can get the length of the array returned by the data method:
var data = $("#arealistview").data("kendoMobileListView").dataSource.data();
var total = data.length;