TypeError: b is undefined when using dynamic loading in grid

I’m using the PRO version of the DHTMLXGrid with paging and dynamic loading - similar to the example here -
dhtmlx.com/docs/products/dhtmlxG … nload.html

I’m getting the following error when I try to get the data from the server with the total_count parameter set.

TypeError: b is undefined
…row_id,styleString){var r=this.getRowById(row_id);if(!r){return}for(var i=0;i<r…

Here’s the response I’m getting from the server:

<?xml version='1.0' encoding='iso-8859-1'?> 22 abc 23 def 24 ghi 25 jkl 26 mno

The data is dummy but it shouldn’t matter here - the total number of records in the DB is 65, and I’m fetching 5 at a time. The expectation is, when the grid sees this data, it would send another request to the server with posStart=5&count=5, given I have my grid set to display 5 rows per page.

Here’s my javascript for the grid:

          var grid = new dhtmlXGridObject("grid_div");
           grid.setHeader("RecordNumber, RecordName");
           grid.enablePaging(true, 5, null, "pagingArea", true);
       grid.setPagingSkin("toolbar", "dhx_skyblue")

Please let me know what I’m doing wrong. I’m tried using both XML format and JSON format to get the data from the server, but both result in this exact error when turning on dynamic loading.

NOTE: If i return all the records at once (all 65 records to match the total_count), this error does not occur - but that doesn’t make sense since it defeats the purpose of dynamic loading

Turns out the reason was because I had sorting and filtering turned on in the javascript, which was the reason for this error. Wish the error message was more useful - I could have saved a lot of time