Profile Picture

SaveControlStateToStream - best format for backwards compatibility

Posted By Jeremy Kolpak 13 Years Ago

SaveControlStateToStream - best format for backwards compatibility

Author
Message
Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Jeremy,

We recommend using CustomXML when backward compatibility is important:

// save control state from file
nChartControl1.Serializer.SaveControlStateToFile(
"c:\\test.xml", Nevron.Serialization.PersistencyFormat.CustomXML, null);

// load control state from file
nChartControl1.Serializer.LoadControlStateFromFile(
"c:\\test.xml", Nevron.Serialization.PersistencyFormat.CustomXML, null);

There were minor problems with this type of serialization in previous versions (they serialized obfuscated properties). If you need to import chart state saved with previous versions you need to contact support@nevron.com with the exact version of the control you're currently using to get assistance regarding porting these files. Versions after 2011 do not have this problem and the state is backward compatible.

As for binary serialization - it is the fastest way to save/load state and we recommend it in cases when you need to temporary save the control state - for example when storing session state in ASP.NET. Othewise it is not backward compatible by design.

Hope this helps - let us know if you have any questions or comments.



Best Regards,
Nevron Support Team



Jeremy Kolpak
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 4, Visits: 1
I have a need to save a charting control's state to a binary / xml format that will be loaded in the future. There is a need to support backwards compatibility for this format in the future as our saved project files may be loaded with upgraded versions of nevron charts at some point in time.

Given this is it safest to save the control state in the XML format vs. binary (which has a benefit of compression I imagine) in order to ensure that the saved state can be re-loaded in the future even with a new version of Nevron Charts?

Thanks!

~Jeremy



Similar Topics


Reading This Topic