onkami
onkami

Reputation: 9431

angular-ui-grid pagination missing

I have an ui-grid options as follows

      {  
   "enableHorizontalScrollbar":false,
   "enableHiding":false,
   "enableColumnResizing":true,
   "enableSorting":true,
   "enableColumnResize":true,
   "paginationPageSize":20,
   "enablePagination":true,
   "enablePaginationControls":true,
   "columnDefs":[  
      // skipped for clarity
   ],
   "data":"griddata",
   "excludeProperties":[  
      "$$hashKey"
   ],
   "enableRowHashing":true,
   "showHeader":true,
   "headerRowHeight":30,
   "rowHeight":30,
   "maxVisibleRowCount":200,
   "minRowsToShow":10,
   "showFooter":false,
   "footerRowHeight":30,
   "columnWidth":50,
   "maxVisibleColumnCount":200,
   "virtualizationThreshold":20,
   "columnVirtualizationThreshold":10,
   "excessRows":4,
   "scrollThreshold":4,
   "excessColumns":4,
   "horizontalScrollThreshold":2,
   "scrollThrottle":70,
   "enableFiltering":false,
   "enableColumnMenus":true,
   "enableVerticalScrollbar":1,
   "minimumColumnSize":10,
   "headerTemplate":null,
   "footerTemplate":null,
   "cellEditableCondition":true,
   "enableCellEditOnFocus":false
}

so I expect some pagination to happen, but it does not. I see scroller instead. What could be the reason?

I aim for client side pagination.

Upvotes: 2

Views: 3547

Answers (3)

Khasan 24-7
Khasan 24-7

Reputation: 467

Sometimes, one can forget to add 'ui.grid.pagination' module in app.js. Check your app.js and if you also forgot to add, add it and it will be working.

Upvotes: 0

r.diazgonz
r.diazgonz

Reputation: 101

Your HTML may be like this:

<div class="grid" ui-grid="gridOptions" ui-grid-pagination></div>

And your ui-grid options:

$scope.gridOptions = {
    //all your code
  };

Upvotes: 1

Panchitoboy
Panchitoboy

Reputation: 840

You have to add the directive to the grid:

<div ui-grid="grid" ui-grid-pagination class="grid"></div>

And add ui.grid.pagination to your module dependence.

Upvotes: 10

Related Questions