Custom link DropDownList

  •  09-25-2007, 2:59 AM

    Custom link DropDownList

    Hi,
     
    I have seen multiple threads about how to customize the Link DropDownList, but I need it one step further.
     
    This is  the code I have seen so far and that works:
     
    Dim tdd As CuteEditor.TreeDropDownList
    tdd =
    DirectCast(Editor1.ToolControls("LinkTree").Control, CuteEditor.TreeDropDownList)
    'clear the items from configuration files
    'see Configuration/Shared/Common.config
    tdd.Items.Clear()
    'Add items by code
    Dim rootitem As CuteEditor.TreeListItem
    rootitem =
    New CuteEditor.TreeListItem("Root")
    rootitem.Selectable =
    False
    tdd.Items.Add(rootitem)
    rootitem.Items.Add(
    "Asp.Net", "Asp.Net", http://www.asp.net)
    rootitem.Items.Add(
    "DotNetNuke.Net", "DotNetNuke.Net", http://www.DotNetNuke.com)
    rootitem.Items.Add(
    "CuteSoft", "CuteSoft", http://CuteSoft.net)
     
    This results in a treeview like:
     
    Root
       Asp.Net
       DotNetNuke.Net
       CuteSoft
     
     
    I like to have the treeview to go deep a few levels so I can get a treeview like this:
     
    Root1
       item1
       item2
       item3
       SubRoot
          subItem1
          subItem2
          SubSubRoot
             subsubItem1
             subsubItem2
     Root2
       item1
    ...
       
    I only managed to add more Root items with items, but I didn't manage to go any deeper then 1 level.
     
    Is it possible and if so, can you give an example code?
     
    Thanks in advance.
View Complete Thread