2016-03-22 38 views
0

Kendo ui虛擬滾動在獲取遠程json數據時不起作用。這裏是代碼Kendo ui angularjs虛擬滾動不起作用

<div id= "test-grid" kendo-grid="testGrid" k-options="testGridOptions"></div> 

$scope.testGridOptions = { 
    dataSource : { 
     transport: { 
      read: function(e) { 
       Service.getdata().then(function(response) { 
        if (response) { 
         $scope.isReqComplete = true; 
         //Response will be {results :[], count:3} 
         e.success(response); 
        } 
       }); 
      }, 
     }, 
     schema : { 
      type : "json", 
     }, 
     type :"json", 
     serverSorting: true, 
     pageSize: 20, 
     serverPaging: true, 
    }, 
    columns: cols, 
    scrollable: { 
     virtual: true 
    } 
} 
+0

什麼是錯誤?你到達控制器?你有任何的JavaScript錯誤? – Daniel

回答

0

客戶端代碼看起來不錯。我相信這個問題與服務器端的實現有關。

你應該檢查服務器是否實現分頁併發送可用記錄的總量。