dhtmlxgrid + Paging + Sort

Hy,



I have a problem with the dhtmlxGrid.

When i active the “paging” and i want to sort my field it doesn’t work great: it sorts only some rows but not all.

If i disable the paging it works great sorting is ok.



This is my code:



// We load and sort the grid


mygrid.loadXML("…", function(){ mygrid.sortRows(2,“str”,“asc”); });


// Paging is enable


mygrid.enablePaging(true,20,3,“pagingArea”,true,“recinfoArea”);




Do the sorting should work with the paging or not ?

Sorting work but in case of dynamical paging it process only already loaded on client side data, so the full sorting is not possible.
In case of static paging, when all data loaded at once - sorting must work correctly ( samples/pro_paging.html ), if some problem occurs for you - please provide full sample code.
( your snippet look correct, but it will be better to enablePaging before loadXML instruction )