Server side sorting and updateFromXML

I have a server-side sorted and paged grid which needs to be periodically updated.

I am using the following code. I added the ‘posStart’ parameter manually since the ‘updateFromXML’ method seems to ignore paging:

//dhtmlx.message({ text: "Refreshing data.", lifetime: 1750 }); var stateOfView = messageResultsGrid.getStateOfView(); var pageTopRow = stateOfView[1]; var pageLastRow = stateOfView[2]; messageResultsGrid.updateFromXML (lastSearch + "&posStart=" + pageTopRow, true, false);

The problem is that when a new element is added, it is always added at the end of the grid, ignoring the row ordering in the XML. I cannot sort after loading since I rely on server-side ordering (the XML is already ordered).

Note: When trying to get this working, I also experienced other issues described in this post: viewtopic.php?f=2&t=14391 .

In case of latest version you can use

messageResultsGrid.updateFromXML (lastSearch + “&posStart=” + pageTopRow, “top”, false);