We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Serializing GridControl and GridTreeControl

Hi. Is there any example for serializing/deserializing GridControl and GridTreeControl? I want to save the grid layout for both controls and I can't seem find the meaningful documentation on this feature or a good example for that matter.

This code generates an exception

var gclayout = thegrid.Model.SerializeAsString();

{"The type Syncfusion.Windows.Controls.Grid.GridTreeModel was not expected.
Use the XmlInclude or SoapInclude attribute to specify types that are not known statically."}

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterGridModel.Write20_GridModel(String n, String ns, GridModel o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterGridModel.Write21_GridModel(Object o)


Thanks
Ariel


1 Reply

JJ Jawahar Jeevanandan J Syncfusion Team November 28, 2011 12:20 PM UTC

Hi Ariel,

Thanks for your patience.

Currently we provide serialization support only for GridDataControl. We have logged a feature request in our database to add serialization support for GridTreeControl. We usually have an interval of at least three months between releases. And the feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. So we request you to check with the product page in our website regarding this feature in the upcoming release.

We have prepared the sample for serialization support in our GridDataControl and you can find the sample from the below link. Please try this sample and let us know whether this helps.

Please let us know if you have any queries.

Thanks,
Jawahar.



Serialization_4ffc4339.zip

Loader.
Live Chat Icon For mobile
Up arrow icon