column widths not always restored


The column width is not always restored. It seem to change work/not-work depending on the columns added. Maybe a timing issue.

All the column configuration is part of the XML.

This is is an extract of it:





















        Column0<column id=“column1”

sort=“str” align=“left” width=“90” type=“ro”>Column1<column id=“column2” sort=“str” align=“left”

width=“90” type=“ro”>Column2<column id=“column3” sort=“str” align=“left” width=“90”


>Column5<column id=“column6”

sort=“str” align=“left” width=“50” type=“ro”>Column6<column id=“column7” sort=“str” align=“left”

width=“50” type=“ro”>BGColumn8Column9


Debugging showed that the cookie is correctly updated and even restored. But something is reseting the column widths afterwards. (Sometimes removing a column made it work)

The column order is saved/restored all the time though.

(Tested with version dhtmlxSuite_2008Rel3_pro_81009)

Kind Regards


Try to move enableAutoSizeSaving and loadSizeFromCookie in afterInit block


In such case size saving will be initialized only after data loaded from cookies, so it will not have chance to overwrite old data before real loading

>>Sometimes removing a column made it work
Please beware that grid has logic , which will ignore loadOrderFromCookie command if count of columns in current grid is lesser that count of column saved in cookies.

Thank you for your response.
I did try that without luck.
But I did also try passing in another name to the enableOrderSaving/AutoSizeSaving function. The result is that only the other cookie is saved. But the column width does not seem to be restored from the cookie.
For example here is the contents of the cookie:

In that case the second column was resized (from less than 100).

What is functionality of ?
There is no default command with such name.

It is our own function to adjust the total width of the grid if necessary (it may change the width of the parent and call setSizes).
But because it appears before the call to loadSizeFromCookie I wouldn’t expect it to interfere.

The sample with the same init code works correctly locally ( working sample sent by email )
If issue still occurs for you - please provide any kind of sample where issue can be reconstructed ( you can send it directly to )