Custom link DropDownList

Last post 09-25-2007, 9:40 AM by Adam. 1 replies.
Sort Posts: Previous Next
  •  09-25-2007, 2:59 AM 33801

    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.
  •  09-25-2007, 9:40 AM 33803 in reply to 33801

    Re: Custom link DropDownList

    Use the following code:
     

      Dim listitem As CuteEditor.TreeListItem
      listitem=new CuteEditor.TreeListItem("Asp<font color=red>.Net</font>","Asp.Net","http:'asp.net")
      rootitem.Items.Add(listitem)    
       
      Dim level2item As CuteEditor.TreeListItem 
      level2item=new CuteEditor.TreeListItem("DotNetNuke.Net","DotNetNuke.Net","http:'DotNetNuke.com")
      listitem.Items.Add(level2item)
      level2item=new CuteEditor.TreeListItem("CuteSoft","CuteSoft","http:'CuteSoft.net")
      listitem.Items.Add(level2item)

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML