Hi,
I am serializing a grid into a string using and then passing the resultant string as parameter for another grid’s loadXMLAsString() method.Like below
gridOrderH.setSerializationLevel(false,true,false,false,false,false);
xmlString = gridOrderH.serialize();
mygrid.loadXMLString(xmlString);
I am getting all the data but not the cell attributes. for eg one cell has a style attribute setting its background color to red in the first grid that is serialized. After serialization only the cell value comes in second grid(grid whose loadXMLAsString() is called). the cell color specified by the style attribute does not come. In short only cell values are getting serialized. I want to serialize the cells attributes also.pls help
You should use:
gridOrderH.setSerializationLevel(false,true,false,true,false,false);
Sorry to resurrect an old thread, but I am having a similar issue to the original poster. I initialize my dhtmlxGrid from XML and include in this a title attribute on each cell.
<?xml version="1.0" encoding="iso-8859-1"?>
<rows>
<row id="1">
<cell title="Comms failure."><![CDATA[<img src="images/transmit_disabled.png"/>]]></cell>
</row>
</rows>
I then set the serialization level as follows:
grid.setSerializationLevel(false,false,true,false,false,true);
I have attempted to set the serialization level as described in the post above, but with the final parameter set to true as I need wrap with CDATA tags.
grid.setSerializationLevel(false,true,false,true,false,true);
However this has no positive effect on the output as I still do not see the attribute tags in the results serialized data. Is there an additional setting I am missing or have I overlooked something?
I am using the latest release of the professional codebase.
Any help is greatly appreciated.
Please check this article docs.dhtmlx.com/doku.php?id=dhtm … attributes
“Including Attributes in Serialization”
Morning OIga, thanks for the response that has addressed one of our export issues.
Can I ask is there a way of configuring the whether the attribute export uses a single quote (’) or a double quote (") to wrap the text? It is currently using a single quoute (’) and this is causing us issues as some of the content already contains single quotes and the string terminating early resulting in an invalid XML structure.
Many thanks.
Unfortunately it cannot be configured.