Pagination in html5 javascript SDK

164 views Asked by At

For the pagination I went through the documentation and understood that it is based on a cursor where you have to specify it to navigate back and forth. I have a requirement to navigate to first page and last page. Like you normally see in conventional Jquery or related grids with 4 buttons. Is this achievable? Also I would like to show the current page of the cursor like "Page 2 of 10". Is there anyway I can get this record count in the same response when you query?

1

There are 1 answers

5
rockerston On

Unfortunately, there really isn't a way to get to the last page. What you are describing is generally referred to as "limit,offset paging", which is common in MySQL or Postgres.

Usergrid currently only supports cursors. Due to the nature of the way cursors work, you have to navigate through the results in a linear fashion, starting at the beginning.