Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Scott on Jun 09, 2007 00:03
open dhtmlx forum
Serialization and Smart rendering mode

How is serialization supposed to work when smart rendering is turned on (no dynamical loading)?

My tests are showing that the grid tries to serialize all data even if it hasn't been rendered yet. This makes sense, but if you set the serialization level to only show changed rows, it causes problems.

If the serialization mode is set to only show changed rows, the serialization code should not try to serialize rows that are not yet rendered in the grid, right? 

Also, my tests show that in IE, there seems to be a bug in this._serializeRow = function(r,i) .... when it gets the xml for a buffer row  and then calls   out+=this.rowsBuffer[1][i].xml; , an extra '</row>' tag ends up in the final xml string.  That's because this._serialise  usually adds the closing row tag: if (temp!="") out += "</row>";   .... but in the case of the buffered row the .xml string already has the closing tag ... thus you end up with duplicates.

Thanks.

PS:   You should use a String Buffer (an array) to generated the serialized xml .... using += on large strings is know to take much longer and eat up tons of memory (at least in IE) that doesn't get released. 
Answer posted on Jun 11, 2007 11:24
>> not try to serialize rows that are not yet rendered in the grid, right?
>>Also, my tests show that in IE, there seems to be a bug in this._serializeRow


Both problems confirmed , fix will be available as part of next build, please contact us directly at dhtmlx@scand.com if you need fix ASAP - I will send you some kind of updated code.

>> You should use a String Buffer (an array) to generated the serialized xml

Agree, such modification already implemented in dev. branch and will be released as part of next build
Answer posted by Scott on Jun 13, 2007 21:53
>>Also, my tests show that in IE, there seems to be a bug in this._serializeRow

It also looks like this also happens when in Tree mode (not using smart rendering, of course) and serialization level is set to only show changed rows. Extra </row> tags get added for each level of heirarchy, it appears
Answer posted on Jun 14, 2007 14:42
Such problem exists, but it caused by next conflict in logic.
The resutl of treeGrid  serialization are multilevel XML , but in case of "only_change" flag enabled grid must include only changed rows in output.
Those two modes conflict with each other and as result provides incorrect output.
If necessary - I can provide some kind of workaround, but it mostly unsupported functionality for now. ( the oncoming treeGrid 1.4 has serious changes in inner logic, it will support such operation correctly )
Answer posted by Alexandra (Support) on Nov 27, 2014 20:31

To find more precise comments upon this issue, we can offer you read about gnat chart and xml javascript menu.