ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

How do I put pagination bar on top of grid

Open euvin3582 opened this issue 10 years ago • 7 comments

Is there a built in feature that allows me to have pagination on top and bottom of the grid?

euvin3582 avatar Mar 07 '16 15:03 euvin3582

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>

angular-git-user avatar Mar 21 '16 12:03 angular-git-user

sorry for the formatting

angular-git-user avatar Mar 21 '16 12:03 angular-git-user

and for detach append use this code var bottomPagination = $("#grid1").find(".ui-grid-pager-container").detach(); ('#youreDivId').append(bottomPagination );

angular-git-user avatar Mar 21 '16 12:03 angular-git-user

how can i pass page size in

{{gridCtrl.gridApi1.pagination.getPage()}}/{{gridCtrl.gridApi1.pagination.getTotalPages()}}

this custom pagination

Gajendrasinh avatar Jan 03 '17 13:01 Gajendrasinh

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.

stale[bot] avatar May 23 '18 04:05 stale[bot]

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.

stale[bot] avatar Jun 22 '18 05:06 stale[bot]

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; }`

puneethravi2 avatar Mar 18 '19 17:03 puneethravi2