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

Pager not working

1 Answer 139 Views
Grid
This is a migrated thread and some comments may be shown as answers.
gdycus
Top achievements
Rank 1
gdycus asked on 20 Nov 2011, 07:42 AM
No matter what page number I click on, a page index of 1 is sent to the server. Anyone know what I'm doing wrong? My code is below. Thanks!

$(document).ready(function () {
    $("#grid").kendoGrid({
        dataSource: {
            type: "json",
            transport: {
                read: "@Url.Content("~/reservation/grid")"
            },
            schema: {
                data: "results",
                total: "total"
            },
            pageSize: 25,
            serverPaging: true,
            serverSorting: true
        },
        height: getGridContentHeight(),
        scrollable: true,
        sortable: true,
        pageable: true,
        columns: [
            {
                field: "FormattedDate",
                title: "Date",
                width: "133px"
            },
            {
                field: "FirstName",
                title: "First Name"
            },
            {
                field: "LastName",
                title: "Last Name"
            },
            {
                field: "TableName",
                title: "Table Name"
            },
            {
                field: "PartySize",
                title: "Size"
            },
            {
                field: "HasNotes",
                title: "Notes",
                template: "#=HasNotes#" == "true" ? "<a href=\"javascript:void(0)\" onclick=\"openNotes(#=CustomerKey#, #=ReservationKey#)\">View Notes</a>" : "N/A"
            },
            {
                title: " ",
                template: '<a href="/admin/customer/profile?customerkey=#=CustomerKey#"><img src="@Url.Content("~/Content/Images/customer_profile.png")" alt="" /></a>',
                width: "131px"
            },
            {
                title: " ",
                template: '<a href="/admin/reservation/change?customerKey=#=CustomerKey#&reservationkey=#=ReservationKey#"><img src="@Url.Content("~/Content/Images/change.png")" alt="" /></a>',
                width: "77px"
            },
            {
                title: " ",
                template: '<a href="javascript:void(0)" onclick="openCancel(#=ReservationKey#)"><img src="@Url.Content("~/Content/Images/cancel.png")" alt="" /></a>',
                width: "77px"
            },
            {
                title: "Checked In",
                template: '<div id="checkin-processing-#=ReservationKey#" class="checkin-processing"><img src="@Url.Content("~/Content/Images/ajax-loader.gif")" alt="" /></div><input id="checkin-#=ReservationKey#" type="checkbox" #=CheckedIn# == true ? "checked=\"checked\"" : "" onclick="checkInOut(#=ReservationKey#, this.checked)" />'
            }
        ]
    });
});

1 Answer, 1 is accepted

Sort by
0
gdycus
Top achievements
Rank 1
answered on 20 Nov 2011, 10:46 PM
I point to the files on cdn.kendostatic.com and the pager started working. That seems to have fixed a lot of bugs.
Tags
Grid
Asked by
gdycus
Top achievements
Rank 1
Answers by
gdycus
Top achievements
Rank 1
Share this question
or