Dynamic Loading in dhtmlxGrid

I am trying to implement pagination with dynamic loading for large data in dhtmlxGrid. We use DWR for server side remoting and JSP/Javascript to display the client. I am able to achieve pagination for the entire data with correct page numbers and total count. However, the entire data loads at once and is not dynamic on each page click.

I have gone through the documentation of dynamic loading and it suggests you need to set ‘posStart’ and ‘totalCount’ variables. Could anyone please help me setting these variables or any alternate suggestions in achieving dynamic page loading?

Santosh G

‘posStart’ and ‘totalCount’ variables should come in the header of your xml.

Also, in addiction you may add the following code to customize the number of the rows that should be loaded at a time:
mygrid._dpref =20; where “20” is the number of the rows that should be loaded

Thanks for the reply.

This issue is we are not sending response from the server in xml format. Its similar to XMLHttpResponse we get from Ajax, but in our case its DWR and we get callbackdata containing response as java objects. How can we attach ‘posStart’ and ‘totalCount’ in the response’s header?

I also tried setting _dpref to the grid. It still loads all the data in one go, and not page by page.

How can we set ‘posStart’ and ‘totalCount’ variables in header in when we are loading data using grid.parse(data,‘jsarray’)?

Unfortunately it is not available to add ‘posStart’ and ‘totalCount’ variables in the jsarray.


Is there any way or workaround to achieve dynamic loading whilst using jsarray?

Unfortunately such feature is not supported.