We've found out browsers cannot handle more than about 4,000 rows, so we are enabling server pagination. We have the following configuration:
(The total number of records is hardcoded because we are testing at this stage and we know the result set size beforehand).
The first page of data is displayed correctly, and the navigation bar is displayed, but empty. That is, on page 0, with no page buttons, back/forward buttons are not responding, and the message "No records" is displayed.
Any help, very welcomed.
8 Answers, 1 is accepted
I do not see an obvious reason for the problem in your code snippet. If I understand correctly, it is the Grid pager that does not get correctly populated with paging UI and correct labels. If the records returned from the remote point are indeed 4000 on initial read, then the pager should get correctly populated.
It would be best if you could reproduce the problem in a Dojo and paste the link here, so I can debug the problem on my side.
Thank you for your answer.
I don't know how to reproduce the error in Dojo, because I don't know of a way produce the massive amount of info handled in this situation.
In the last code snippet, your total function returns a 0 value. Can you confirm that this is not the case in your app, because a total of 0 would result in no paging in the Grid. Additionally, you say that you are unable to reproduce the issue in a Dojo because you cannot produce such a large amount of data. Does this mean that the problem is only observable when you load the large page size? Have you tried binding the same Grid to a smaller subset, e.g. 100 items and is the problem with the pager still there?
Effectively, the function in the default Grid Datasource returns 0, but this Datasource is replaced with the definition in the first snippet upon user interaction with the web page. Anyways, we tried returning the total number of records, a smaller number, and removing the definition altogether, and in every case the result is the same.
With a smaller dataset I get the same results We tried pageSize: 10 and total: 200.
Just to make sure: The server has to return only the current page, right?
Running out of ideas,
We removed the field aggregates, groupFooterTemplate, and footerTemplate and it's working.
Please advice on how to handle these in this scenario (server pagination).
We removed the aggregates, groupFooterTemplate, and footerTemplate from the Grid field properties and now it's working?
Please advice on how to handle these properties in this scenario (server pagination).
When you combine server paging with other client operations, the client operations are performed only on the current page of data returned from the server. That is why, it is advised to have either all operations performed on the client, or all operations performed on the server.
So, if you want to have grouping and aggregates together with server paging, you should also enable serveGrouping and serverAggregates and add the needed logic on the server to return grouped data and aggregates.
Thank you. We'll follow your directions.