Remote data with pager

1 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 17 Apr 2012 Link to this post

    Where's a sample that uses a pager on remote data.  Like I see you have a products demo (the main one)...but you have 76 records returned.  How do I configure it so that I can have the pager set the take and skip values so I'm only getting the items on demand?

    $(document).ready(function () {
        var dataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: $medportal.Url.Host + "/Sitefinity/Services/Medportal/Community/ForumService.svc/forum/2445",
                    contentType: "application/json; charset=utf-8",
                    type: "GET",
                    dataType: "json",
                    data: {
                        take: 3,
                        skip: 0
                    }
                }
            },
            schema: {
                data: "Items",
                total: "TotalCount"
            }
        });
     
        $(".telligent-listview-pager").kendoPager({
            dataSource: dataSource
        });
     
        var template = "<li>${Subject}</li>";
     
        $(".telligent-listview").kendoListView({
            pageSize: 3,
            dataSource: dataSource,
            template: kendo.template(template)
        });
     
     
    });
Back to Top