Grid only shows first page of records after upgrade to 3.5

Since I upgraded to version 3.5, my grid seems to load normally and then when the PreRendering or SmartRendering triggers (I have both enabled), the scroll bar jumps from showing a full list to showing 2 pages.

Has something changed? The way my code worked before was like this:

If pos is 0, return the total number of records - even though we are only displaying say 30

<?xml version='1.0' encoding='iso-8859-1'?> <rows pos="0" total_count="8987" >

If pos > 0, return the number of records being returned (30 if we were able to find 30)

<?xml version='1.0' encoding='iso-8859-1'?> <rows pos="33" total_count="30" >

When I look at my HTTP requests, I have the initial request which returns the total: 8987. At this point all looks well. The scroll bar looks like I’ve got 8k records.

Then a second later, another request goes in and comes back with the next page. At this point, the scroll bar jumps to show that I only have about 80 records.

Oddly, I also seem to have a duplicate request. It does the preload request twice for some reason.

Here is an abbreviated version of my initialisation code:

Contacts.setImagePath("/system/plugins/dhtmlxGrid/codebase/imgs/"); Contacts.setHeader("*,ID,First Name(s),Last Name,Organisation,Job Title,Status,Owner"); Contacts.setInitWidths("32,60,100,120,200,200,120,120"); Contacts.setColAlign("center,center,left,left,left,left,left,left"); Contacts.setColTypes("ch,ro,ed,ed,ed,ed,co,co"); Contacts.setColSorting("server,server,server,server,server,server,server,server"); Contacts.setSkin("dhx_terrace"); Contacts.enableEditEvents(false, true, true); Contacts.init(); Contacts.enableSmartRendering(true); Contacts.enablePreRendering(30); var dp = new dataProcessor('system/api/contactUpdate.php'); dp.setTransactionMode("POST",true); dp.init(Contacts);

I guess I’m on my own here?

Having fiddled with my code I have worked out that if I return total_count=0 on all but the very first request, it eliminates this weird jumping.

I still haven’t been able to find any documentation to suggest that this functionality has changed, but if I use my old way with the previous version it works perfectly.

Now I have a different problem with the new version: if I page down quickly, it misses bits. It loads the data but the grid does not update correctly.