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

kendo grid Serverpaging not working

0 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
tharani
Top achievements
Rank 1
tharani asked on 02 May 2014, 09:59 AM
this is kendo grid code i want to load only 2  data in page 1 in kendo grid after while clicking to page 2 again another ie(next 2 data) want to load in grid this is because of increase loading speed.. i have no idea how to do it..pls anybody help me.....this is my code..    





    <script>
      var url = 'my service url here';

      var griddatasource = new kendo.data.DataSource({
        transport: {
          read: function (option) {

            $.ajax({
              url: url + '',
              dataType: 'json',       
              success: function (result) {
                option.success(JSON.parse(result.d));
                alert(result.d);        
              },
              error: function (result) {
                alert("error");

              }
            });
          }
        },

        serverFiltering: true,
        serverSorting: true,
        serverPaging: true,
        pageSize: 2,
        schema: {
          data: "data",
          total: "total",
        }

      });

      function grid() {
        $("#grid").kendoGrid({
          dataSource: griddatasource,
          groupable: true,
          //sortable: {
          //    mode: "multiple",
          //    allowUnsort: true
          //},
          sortable: true,
          selectable: true,
          filterable: true,
          reorderable: true,
          resizable: true,
          columnMenu: true,
          pageable: {
            refresh: true,
            pageSizes: true,
            buttonCount: 5
          }
        });
      }
      $(document).ready(function () {
        grid();
      });

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
tharani
Top achievements
Rank 1
Share this question
or