How do I put pagination bar on top of grid
Is there a built in feature that allows me to have pagination on top and bottom of the grid?
You will need to detach and append in a div above.. I have used this for my project..
or just create youre own pagination.///
<div id="top-pagination" class="ui-grid-pager-control"> <button type="button" class="ui-grid-pager-first" ng-click="gridCtrl.gridApi1.pagination.seek(1)" title="Page to first" aria-label="Page to first"> <div class="first-triangle"><div class="first-bar"></div></div> </button> <button type="button" class="ui-grid-pager-previous" ng-click="gridCtrl.gridApi1.pagination.previousPage()" ng-disabled="cantPageBackward()" title="Page back" aria-label="Page back"> <div class="first-triangle prev-triangle"></div> </button> <span>{{gridCtrl.gridApi1.pagination.getPage()}}/{{gridCtrl.gridApi1.pagination.getTotalPages()}}</span> <button type="button" class="ui-grid-pager-next" ng-click="gridCtrl.gridApi1.pagination.nextPage()" title="Page forward" aria-label="Page forward"> <div class="last-triangle next-triangle"></div> </button> <button type="button" class="ui-grid-pager-last" ng-click="gridCtrl.gridApi1.pagination.seek(gridCtrl.gridApi1.pagination.getTotalPages())" title="Page to last" aria-label="Page to last"> <div class="last-triangle"><div class="last-bar"></div></div> </button> </div>
sorry for the formatting
and for detach append use this code
var bottomPagination = $("#grid1").find(".ui-grid-pager-container").detach();
('#youreDivId').append(bottomPagination );
how can i pass page size in
this custom pagination
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. If you believe that this is still an issue in the latest version, feel free to re-open it. Thank you for your contributions.
this can be achieved by css, as ag-grid does not supports the positioning of the pagination component `.ag-theme-balham { background-color: transparent; margin-top: -30px; }
.ag-paging-panel > span { color: black !important; }
.ag-root-wrapper { position: relative !important; }
.ag-root-wrapper-body { margin-top: 30px; }
.ag-paging-panel { position: absolute !important; top: 0 !important; right: 0 !important; border-top: none !important; }`