Can you share a code for adding New RadTreeView into RadPanelBar programmatically on code behind in ASP.Net Vb.Net.
Thanks.
1 Answer, 1 is accepted
0
Nencho
Telerik team
answered on 16 Dec 2014, 10:43 PM
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
AddTreeViewInPanelBar()
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"))
RadPanelBar1.Items(0).Controls.Add(tree)
End Sub
Regards,
Nencho
Telerik
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.