After updateXML call on sorted Grid, Grid does not retain its sort order. Otherwise the grid retains its sort order.
I called following two lines after updateXML but that did not help either.
These lines are called after loadXML command as well.
mygrid.loadSortingFromCookie(‘dsort’);
mygrid.enableSortingSaving(‘dsort’);
Note:
I already have following in my code after mygrid.init()
mygrid.attachEvent(“onAfterSorting”, function(index,type,direction){
mygrid.saveSortingToCookie(‘dsort’);
});
Sorting is one time operation, grid will not auto-resort data when values are changed. So if after updateFromXML data is changed in the grid, it will not cause auto reordering, but if sortRows will be called programmatically or by user’s actions - grid will be correctly corted with new data.