Help With Treeview Template GetXml

2 posts, 0 answers
  1. Julie
    Julie avatar
    27 posts
    Member since:
    Dec 2008

    Posted 09 Jan 2009 Link to this post

    I add controls to the tree at runtime, the tree renders fine, but I don't see the controls listed in the XML, I need to expose them, as I just want to store the xml in the database.

    The Output from getXML....
     
    <?xml version="1.0" encoding="utf-16"?>
    <Tree AllowNodeEditing="True" CheckChildNodes="True" MultipleSelect="True" EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="True" OnClientNodeEdited="OnClientNodeEditedHandler" OnClientNodeDropped="OnClientNodeDropped" OnClientNodeDragging="OnClientNodeDragging" AppendDataBoundItems="True" Skin="Outlook" EnableAjaxSkinRendering="False">
      <Node Text="root1" Expanded="True" />
      <Node Text="root2" Expanded="True" />
      <Node Text="root3" Expanded="True" />
      <Node Text="root4" Value="Templated" Expanded="True" />
    </Tree>

    the code:

     

    protected void Page_Load(object sender, EventArgs e)

     {

     

    if (!Page.IsPostBack)

     

     

     {

     

        this.RadTreeView1.AppendDataBoundItems = true;

     

     

        this.RadTreeView1.PersistLoadOnDemandNodes = true

     

        this.RadTreeView1.Nodes.Add(new RadTreeNode("root1"));

     

     

        this.RadTreeView1.Nodes.Add(new RadTreeNode("root2"));

     

     

        this.RadTreeView1.Nodes.Add(new RadTreeNode("root3"));

     

     

        RadTreeNode root4 = new RadTreeNode("root4");

     

     

        TextBox textbox1 = new TextBox();

     

        root4.Controls.Add(textbox1);

        root4.Value =

    "Templated";

        this.RadTreeView1.Nodes.Add(root4);

        this. RadTreeView1.DataBind();

     

     

    }

     

     

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 10 Jan 2009 Link to this post

    Hello Julie,

    This is not supported by RadTreeView for the time being. Controls in the template are not serialized in XML.

    Regards,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top