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>
<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();
}