Page Number Max?

Page Number Max?

kombatkombat Posts: 15Questions: 5Answers: 0

Is it possible to set a maximum page number? I browsed through the full-reference page and it wasn't obvious that it could be done.

We have a query that can get complex and for performance reasons in Oracle and JPA are limiting the results to 1,000 rows. Currently, the backend developers are giving me the total row count. So if 5,000 rows come back, I get that number but then the pagination shows there are 500 pages, But if I go past page 100 I simply get no results found.

I see a couple of options. I could display "Showing 1-10 of 5,000" and the page numbers only go up to 100. I know I could force the user to a "last" page if they wandered past 1,000, but that seems hacky to have the UI show 500 pages but being forced to 100 if they go past that. I'd rather the UI just shows there are 100 pages. I don't think there is a max page setting anywhere, so the hacky method seems the only way to do this option.

The other alternative would be to show the total as 1,000, but in a separate message on the screen show the true total (5,000). Or is it possible to modify the datatables default to say "Showing 1-10 of 1,000 out of 5,000 total"?

Thank you.

Answers

  • kombatkombat Posts: 15Questions: 5Answers: 0

    I figured it out with about 5 minutes more research. Ooof.

    I can set iTotalRecords to the full amount, and change the appended text using sInfoFiltered.

This discussion has been closed.