1

i am getting 10k record from db.how ng-grid is managing at client side if i use 10 per page pagination. Below is the snippet of the code.

<div class="dataGridClass" ng-grid="gridOptions" />

code in controller

var app = angular.module('myApp', ['ngGrid']);
 app.controller('MyCtrl', function($scope) {
    $scope.myData = data; // from ddb
    $scope.gridOptions = { 
        data: 'myData',
        enablePaging: true,
    };
});
Daniel
  • 3,541
  • 3
  • 33
  • 46
Mukti
  • 291
  • 2
  • 5
  • 13
  • possible duplicate of [How to do client-side paging with ngGrid?](http://stackoverflow.com/questions/20261365/how-to-do-client-side-paging-with-nggrid) – Daniel Jun 16 '14 at 13:25
  • No, it is not same. If i have 10k record and i have 10 record per page, when i hit next how it actually works i.e how it get to know which record it should fetch next !! hope i clarified my question – Mukti Jun 16 '14 at 18:45

1 Answers1

1

The enablePaging option is only used for server-side paging. You need to implement your own pagination algorithm for client-side-pageination.

Daniel
  • 3,541
  • 3
  • 33
  • 46