SaveXML and LoadXML only works partially

3 posts, 0 answers
  1. Alain
    Alain avatar
    13 posts
    Member since:
    Mar 2011

    Posted 19 Jun 2011 Link to this post


    I'm using Winform Q1 2011 SP1 and VS2008.
    While trying RadTreeView.SaveXML(@"TreeView.xml") , I noticed that information such as forecolor, strikeout fontstyle ...for each individual node is not saved in the XML document.
    When using RadTreeView.LoadXML(@"TreeView.xml")), and while information such as CheckState="On" is in the XML document next to some nodes, the RadTreeView is loaded without any of the node's checkboxes being 'checked (they're all left unchecked).
    Also and if I add manually Forecolor="Green" in the TreeView.xml document next to some nodes, the LoadXML method will assign correctly the color green to some nodes.

    As I plan to let the user decide of the data to be added in the RadTreeView, it sounded like a promising feature, so is there anyway to correct the above (get checkboxes checked or unchecked, forecolor...)? 
    SaveXML allows for some extra types to be saved. What are they? Any documentation on this?

    The help file mentions also that 'For direct access to the tree view XML as text use the TreeViewXML property.'. How is this implemented concretely?

    Best regards,
    Alain Cavenaile

  2. Svett
    Svett avatar
    728 posts

    Posted 22 Jun 2011 Link to this post

    Hi Alain,

    I confirm that the illustrated case is an issue with RadTreeView. It will be addressed in one of the next major releases. In the meantime, I cannot give you work around due to internal implementation of RadTreeView serialization. I added it to our public issue tracking system. I hope that this is not show stopper for you.

    The TreeViewXml property contains the XML data representation of RadTreeView. It invokes internally the SaveXML and LoadXML methods. The extraTypes parameter of these method allows easy XML serialization extending. This gives opportunity to increase the object-graph serialization. You can read more about that in this MSDN article

    Thank you for your understanding and cooperation. I updated your Telerik points.

    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  3. DevCraft R3 2016 release webinar banner
  4. Alain
    Alain avatar
    13 posts
    Member since:
    Mar 2011

    Posted 25 Jun 2011 Link to this post

    Thanks for your feedback.

    I managed to serialize and deserialize the RadTreeView by adapting the code from the following link (I posted it here in case other Telerik users would like a work around on RadTreeView.SaveXML and LoadXML):
    then included also font, forecolor...

    So my issue is basically solved.

    Best regards,

Back to Top