I'm having a problem getting an MVC ListView to initially load via the model and then page using Ajax. I've configured a grid to do this without issues but the ListView datasource doesn't seem to support Ajax, although the documentation suggests it does?
https://docs.telerik.com/aspnet-mvc/html-helpers/data-management/listview/binding
I initiate the list with 10 records and then specify the total amount of records in the datasource. I then expect to see 10 records on the first page and to have the ability to click on the other pages. When I click on a page an Ajax call should be made to retrieve the relevant records. However all I see is the 10 records from the model and no paging.
Here is my ListView:
@(Html.Kendo().ListView<Feed>(Model)
.Name("FeedList")
.TagName("ul")
//.BindTo(Model)
.ClientTemplateId("feed-detail-list-template")
.DataSource(
source => source
//.Ajax() I get an error that there is no definition for Ajax if I uncomment this
.ServerOperation(false)
.Model(model => model.Id(p => p))
.Read(
read =>
{
read.Action(action, controller, new { id = parentId });
}
)
.PageSize(10)
.Total(totalRecords) // appears to be ignore
.Events(events => events
.Error("onDataSourceError")
)
)
.Pageable()
)
Any help appreciated.