0
votes

i am very much new to kendo grid, so please consider my question and help me.

i have a coldfusion page which has an array variable that contains all the user records retrieved from database.

now i have a function, for pagination. i want to enable server side paging in this, but actually have no idea on how to do this.

please help.

$(document).ready(function(){
 $("#data_table3").kendoGrid({
  dataSource: {
   pageSize: 10
  },
  pageable: {
   refresh: true,
   pageSizes: true
  },
  columns: [ {
     field: "UserName",
     width: 90,
     title: "User Name"
    } , 
    {
     field: "FirstName",
     width: 90,
     title: "First Name"
    } 
   ],           
   height: 460,
   sortable: true       
  });
  $("#data_table").show();
}); 
1

1 Answers

0
votes

Hi try like this ,

 $("#appointmentsGrid").kendoGrid({
            columns: [
                        { field: "MemberFirstName", title: "Member<br/>First Name" },
                        { field: "MemberLastName", title: "Member<br/>Last Name" }                   
                     ],
            dataSource: new kendo.data.DataSource({
            serverPaging: true,
            serverSorting: true,
            transport: {
                read: {
                    url: "/Content/GetCustomerNameWithId",
                    data: additionalData
                }

            },
            pageSize: 10,
            schema: { data: "data", total: "total" }
            }),
            pageable: true,
            sortable : true
        });