Dynamically added RadTreeView not visible

2 posts, 0 answers
  1. chrispo
    chrispo avatar
    10 posts
    Member since:
    Jan 2010

    Posted 23 Oct 2010 Link to this post

    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
  2. chrispo
    chrispo avatar
    10 posts
    Member since:
    Jan 2010

    Posted 23 Oct 2010 Link to this post

    Ignore - it seems to work!
Back to Top