I want to enable footers for ng-grid but I want to completely customize it and override what ng-grid does by default.
Basically, I just want a 'Load more...' link at at the bottom of the grid that will load more rows from the server according to what pagingOptions.pageSize is set to and append it to the bottom of the grid while dynamically expanding the viewport height so there is no scrollbar.
Is there a configuration hook for this, or where/how can I do this?
Thanks.
Although it is not listed in the API section of the ng-grid website, you can define a custom
$scope.gridOptions.footerTemplate
. Take a look a the source code and you will find (it is undefined, so it falls back to the default template as shown below):And here is the default template:
Here is how I did it inline. This custom footer removes the paging option while showing the current page, total, page first, next, previous and last buttons.
You put it in the options for the grid.
Here is how I hid the PageSize picker.