Data Grid Jump to last page load whole data

Yes, it does take time, but it takes less time than slicing on the client side. When you slice on the client side, you consume the iterator, which will trigger one server call every few (100?) items, so you end up with tons of (equivalent of) server calls that you didn’t even plan. So one server call is at worst as slow as getting the first page, but it’s usually much faster than going through an iterator on the client side.

Creating your own server side slicer instead, whether you do it with sql, with q.greater_than or by slicing the iterator on the server side, you will always have only one server call per user interaction.

You can get fancy and cache the slices on the client, so if the user clicks on next page, then on prev page, you get the cached page rather than executing another server call.

I would do this with the (omnipresent in my apps) routing module from Anvil Extras, and expose the page number and size in the url so that myapp/#?list=mylist&pagenumber=5&pagesize=20 would execute one server call to get items from 81-100. The paging buttons would use routing.set_url_hash to show the first/prev/next/last page and the router module would take care of caching the pages for you.