Add New RadTreeView into RadPanelBar Programmatically

2 posts, 0 answers
  1. Jimmy
    Jimmy avatar
    2 posts
    Member since:
    Feb 2014

    Posted 11 Dec 2014 Link to this post

    Dear Telerik Admin, 

    Can you share a code for adding New RadTreeView into RadPanelBar programmatically on code behind in ASP.Net Vb.Net.

  2. Nencho
    Nencho avatar
    1858 posts

    Posted 16 Dec 2014 Link to this post

    Hello Jimmy,

    You can use the Controls collection of the preferable RadPanelItem and add the instance of the dynamically created RadTreeView in code behind. For example please consider the below implementation:

    Protected Sub Page_Load(sender As Object, e As EventArgs)
        If Not IsPostBack Then
        End If
    End Sub
    Protected Sub AddTreeViewInPanelBar()
        Dim tree As New RadTreeView()
        tree.Nodes.Add(New RadTreeNode("Node 1"))
        tree.Nodes.Add(New RadTreeNode("Node 2"))
        tree.Nodes.Add(New RadTreeNode("Node 3"))
        tree.Nodes.Add(New RadTreeNode("Node 4"))
        tree.Nodes.Add(New RadTreeNode("Node 5"))
    End Sub


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top