This is a migrated thread and some comments may be shown as answers.

Dynamically added RadTreeView not visible

1 Answer 110 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
chrispo
Top achievements
Rank 1
chrispo asked on 24 Oct 2010, 03:35 AM
HI

I'm adding a RadTreeView dynamically, then adding some nodes using LoadXmlString.

The Treeview is not visible after loading. But checking the source code, its there in the page, with nodes correctly added, just invisible.

What am I doing wrong?

Here is the creation code
// adding placeholder first recommdended by Telerik
PlaceHolder TVPanel = new PlaceHolder();
this.Form.Controls.Add(TVPanel);
// create a new radtreeview object

        RadTreeView Rad1 = new RadTreeView();
        Rad1.ID = "Rad1";
        Rad1.Visible = true;
        TVPanel.Controls.Add(Rad1);
// create a new radtreeview object
RadTreeView Rad1 = new RadTreeView();
Rad1.ID = "Rad1";
Rad1.Visible = true; // doesnt make a difference
TVPanel.Controls.Add(Rad1);

String TreeViewNodes = Navigator_GetContent;
Rad1.LoadXmlString(TreeViewNodes);
PlaceHolder TVPanel = new PlaceHolder();
        this.Form.Controls.Add(TVPanel);

        // create a new radtreeview object

        RadTreeView Rad1 = new RadTreeView();
        Rad1.ID = "Rad1";
        Rad1.Visible = true;
        TVPanel.Controls.Add(Rad1);
        

        // then generate the treeview content
        String TreeViewNodes = Navigator_GetContent("Navigate_GetPlaceChecklist.xquery", "");
        // attach it
        Rad1.LoadXmlString(TreeViewNodes);
PlaceHolder TVPanel = new PlaceHolder();
 
        // adding placeholder first recommdended by Telerik
        PlaceHolder TVPanel = new PlaceHolder();
        this.Form.Controls.Add(TVPanel);

        // create a new radtreeview object

        RadTreeView Rad1 = new RadTreeView();
        Rad1.ID = "Rad1";
        Rad1.Visible = true;
        TVPanel.Controls.Add(Rad1);
        

        // then generate the treeview content
        String TreeViewNodes = Navigator_GetContent("Navigate_GetPlaceChecklist.xquery", "");
        // attach it
        Rad1.LoadXmlString(TreeViewNodes);
     this.Form.Controls.Add(TVPanel);

        // create a new radtreeview object

        RadTreeView Rad1 = new RadTreeView();
        Rad1.ID = "Rad1";
        Rad1.Visible = true;
        TVPanel.Controls.Add(Rad1);
        

        // then generate the treeview content
        String TreeViewNodes = Navigator_GetContent("Navigate_GetPlaceChecklist.xquery", "");
        // attach it
        Rad1.LoadXmlString(TreeViewNodes);
// Where String Navigator_GetContent is valid Tree Node text

1 Answer, 1 is accepted

Sort by
0
chrispo
Top achievements
Rank 1
answered on 24 Oct 2010, 04:49 AM
Ignore - it seems to work!
Tags
TreeView
Asked by
chrispo
Top achievements
Rank 1
Answers by
chrispo
Top achievements
Rank 1
Share this question
or