updateFromXML does not work correct on DHTMLXgrid

I have created a grid, which allows the user to move the columns. When the user now calls the function mygrid.updateFromXML("./xml.php", true, true, function() {updateInfo();}); then the data is loaded, but in the “old structure”.

[code]col1 | col2 | col3

val1.1 | val1.2 | val1.3
val2.1 | val2.2 | val2.3[/code]

now I move col3

[code]col3 | col1 | col2

val1.3 | val1.1 | val1.2
val2.3 | val2.1 | val2.2[/code]

now I call the updateFromXML method:

[code]col3 | col1 | col2

val1.1 | val1.2 | val1.3
val2.1 | val2.2 | val2.3[/code]

after moving the columns I saved the order to a cookie. the xml.php reads this cookie and put the rows in the right order but the grid sort it.

is there a way to say that the grid should not rearange the columns? In my xml file the header (columns) and cells are given in the new right order. Is the only way to reload the complete grid again?

It would be easier, if i could give every column an id (i know it’s possible) and every cell a column_id (it is not possible) so that the grid could arrange the cells by the column_id. so the order of cells in the xml could be in any order.

Can be done only by code modification.

By default grid made all resorting automatically, so you just need not care about custom order of columns on the server side ( just ignore cookies and always send data in the same format ), grid will change order of values based on moved-columns settings.

If you still want to disable such behavior, locate in dhtmlxgrid.js

var cellVal = cellsCol[this._c_order?this._c_order[j]:j];

and replace it with

var cellVal = cellsCol[j];