This is a migrated thread and some comments may be shown as answers.

Paging not working

2 Answers 72 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 02 Oct 2013, 01:43 AM
First, I am using ASP.Net MVC 4 and the following code to bind to an IEnumerable list...

 <div style="text-align:right">
            @(Html.Kendo().ListView<mattcuda.com.Kendo.Models.MattCudaImage>(Model)
                .Name("listView")
                .TagName("div")
                .ClientTemplateId("template")
                .Navigatable()
                .DataSource(dataSource => {
                    dataSource.Read(read => read.Action("Images_Read", "ListView"));
                    dataSource.PageSize(5);
                })
                 .Selectable(selectable => selectable.Mode(ListViewSelectionMode.Multiple))
                 .Events(events => events.Change("onChange").DataBound("onDataBound"))
               
                 .Pageable()
            )
            </div>

When I do this, the listview binds perfectly and it limits the paging to 5 as it should but it won't page to the next set of records.  What code am I missing to make this happen.  Does it not happen automatically since it is using binding?


Thanks,

Matt


2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 03 Oct 2013, 09:28 AM
Hi Matt,

The code snippet looks OK. Please check for Javascript errors and send a runnable example if you need additional assistance.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
J-P
Top achievements
Rank 1
answered on 14 Dec 2013, 09:27 AM
Hi,

I came across the same problem. I changed in .dataSource.Read "ListView" to proper controller that I'm using.

You can also use Fiddler to get more info what's going on after changing page.

-J-P
Tags
ListView
Asked by
Matthew
Top achievements
Rank 1
Answers by
Dimo
Telerik team
J-P
Top achievements
Rank 1
Share this question
or