Mukti
Mukti

Reputation: 311

how ng-grid manage to show data using pagination?

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,
    };
});

Upvotes: 1

Views: 561

Answers (1)

Daniel
Daniel

Reputation: 3514

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

Upvotes: 1

Related Questions