Hello, If anyone has good knowledge of ng-grid, I would welcome a brief explanation / clarification on the expected pagination behaviour.
Ng-grid is a great library, and for the most part does everything well. The one part I have struggled to correctly understand is the expected pagination behaviour. The documentation seems almost non-existent. The demo Getting Started code is really nice, but does not actually clarify the questions I have. Starting with Versions, am on Angular 1.2.17, angular-grid (ng-grid) 2.0.11, and have Jquery 2.1 (which is ahead of the default dependency version ng-grid uses). Question 1: Is the pagination really Server side or Client side? In other words, is the API call expected to bring down every result set row from the server, and then subsequently paginate on that in the UI, or can it truly do server side pagination with say query params limit=x&offset=y. Question 2: If ng-grid does not pull down the entire resultset up front - How does ng-grid know what the total number of items are when the pagination works with a discrete limit and offset? Question 3: method "getPagedDataAsync" gets called when paging between pages on ng-grid. In other words, it is making a query to the server for the full result set EVERY time the pagination is clicked... it is grabbing the entire result set from the server, and then just doing quasi-local pagination. Is it the responsibility of the data service provider (our code external to mg-grid but inside Angular Factory etc) to retain the information on full data size, and cache data etc to provide to the ng-grid table were recalling the server for the same data would be inappropriate? Finally, am finding another strange behaviour: The pagesize does not work correctly, if you start with pagesize 50, go to pagesize 10, it works. If you then return to pagesize 50 it fails to update the table with the rows that should now be available. Any help / clarification with this would be much appreciated. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
