Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Panelbar (obsolete as of Q2 2010) > is it possible to insert Treeview in radPanelBarGroupElement??

Not answered is it possible to insert Treeview in radPanelBarGroupElement??

Feed from this thread
  • lee doo avatar

    Posted on Oct 5, 2010 (permalink)

    I want to insert Treeview in radPanelBarGroupElement.

    but I dont know what I have to do!!

    Reply

  • Posted on Oct 5, 2010 (permalink)

    Hello lee,

    Before providing a solution, i wanted to ask you if there isn't any way of switching to the new RadPageView control, because as you might now, the RadTabBar is obsolete and will be removed soon...

    Now, if you want to do this, there are a few things you have to know about the RadTabBar, first, by default it just accepts RadItems, not controls, but if you want the TabBar to accept controls, you have to create a group, and set it's  EnableHostedControlMode to true, after this you can add the controls you want using the groups ContentPanel.Controls property. If you want to read some more about the RadTabBar control you should take a look at the available documentation (PanelBar Documentation).

    I have created a full working example as follows:
    using System.Windows.Forms;
     
     using Telerik.WinControls.UI;
     
     public partial class Form1 : Form
     {
         private RadPanelBar radPanelBar1 = new RadPanelBar();
     
         public Form1()
         {
             InitializeComponent();
             this.Load += new System.EventHandler(Form1_Load);
         }
     
         void Form1_Load(object sender, System.EventArgs e)
         {
             radPanelBar1.Dock = DockStyle.Fill;
             this.Controls.Add(radPanelBar1);
     
             var radGroupContacts =
    new RadPanelBarGroupElement();
             radGroupContacts.Caption = "Contacts";
             var radGroupCalendar =
                new RadPanelBarGroupElement();
             radGroupCalendar.Caption = "Calendar";
     
             radPanelBar1.GroupStyle = Telerik.WinControls.PanelBarStyles.ListBar;
             var radGroupTree =
    new RadPanelBarGroupElement();
             radGroupTree.EnableHostControlMode = true;
     
             var radTreeView1 = new RadTreeView();
             var node1 = new RadTreeNode("Node1");
             var node2 = new RadTreeNode("Node2");
             var node3 = new RadTreeNode("Node3");
             var node4 = new RadTreeNode("Node4");
             radTreeView1.Nodes.Add(node1);
             radTreeView1.Nodes.Add(node2);
             node1.Nodes.Add(node3);
             node2.Nodes.Add(node4);
             radTreeView1.Dock = DockStyle.Fill;
             radGroupTree.ContentPanel.Controls.Add(radTreeView1);
             radGroupTree.Caption = "TreeView Example";
     
             radPanelBar1.Items.AddRange(new Telerik.WinControls.RadItem[] { radGroupTree, radGroupCalendar, radGroupContacts });
         }
     }

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga

    Reply

  • lee doo avatar

    Posted on Oct 6, 2010 (permalink)

    Thanks very much!!

    I dont know RadPageVIew is in Component.

    simply I use it!!! :)


     

    Reply

  • Posted on Oct 7, 2010 (permalink)

    Hello again Lee,

    The PageViewControl is a relatively new control, so it depends on the version of telerik controls you are using, I would recommend updating to the latest version, Q2 2010 SP 2 to take advantage of the new controls and also benefit from the performance increase in the controls provided by the new virtualization mechanism To see more release and other information about this release click here.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Panelbar (obsolete as of Q2 2010) > is it possible to insert Treeview in radPanelBarGroupElement??
Related resources for "is it possible to insert Treeview in radPanelBarGroupElement??"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]