or

Private Sub PopulateNodes(ByVal nodes As Telerik.Web.UI.RadTreeNodeCollection, Optional parentid As Integer = Nothing) Dim objConn As New SqlConnection(Application("dbRO")) Dim tConn As New SqlConnection(Application("db")) Dim objCommand As New SqlCommand("SELECT ItemID,ItemDescription,ItemURL,ImageURL FROM tblROMenuItems sc WHERE Visible=1 ORDER BY ItemOrder", "ItemParent=@ParentID AND Visible=1 ORDER BY ItemOrder,ItemOrder2,ItemOrder3,ItemOrder4"), objConn) If Not (parentid = 0) Then objCommand.Parameters.Add("@ParentID", SqlDbType.Int).Value = parentid Dim da As New SqlDataAdapter(objCommand) Dim dt As New DataTable() da.Fill(dt) For Each dr As DataRow In dt.Rows Dim tn As New RadTreeNode Select Case dr("ItemID").ToString Case "52" 'separation lines tn.Enabled = False 'tn.SelectAction = TreeNodeSelectAction.None End Select tn.Value = dr("ItemID").ToString tn.ImageUrl = dr("ImageURL").ToString tn.Text = dr("ItemDescription").ToString tn.CssClass = IIf(parentid = 0, "rootNode", "childNode") tn.Target = dr("ItemURL").ToString nodes.Add(tn) PopulateNodes(tn.Nodes, dr("ItemID")) NextEnd Sub<asp:Panel BorderStyle="None" CssClass="Menu" HorizontalAlign="Left" ID="pnlModules" runat="server" ScrollBars="Auto" style="background-size: 100%; left: 0; position: relative; top: 0; width: 100%"> <telerik:RadTreeView BorderStyle="None" ExpandAnimation-Duration="200" ID="TreeView1" RenderMode="Lightweight" runat="server" SelectedCssClass="selectedNode" ShowLineImages="False" SingleExpandPath="True" Width="100%" MaxDataBindDepth="10" /></asp:Panel>With RadMenu, the following alternatives are present: