the right time to dynamically set links in Linktree ddl

Last post 01-25-2006, 4:13 PM by Adam. 2 replies.
Sort Posts: Previous Next
  •  01-25-2006, 4:03 PM 15130

    the right time to dynamically set links in Linktree ddl

    When is the right time to do this...My editor is in a panel. I have tried it on Panel_Prerender and also Editor1_load.
     
    The code runs fine with no errors and appears to work correctly, but then when I click on the Links ddl, all i get is what is in the configuration file. I can only assume it is reading the config file after my code is executed.
     
    Any help would be GREATLY appreciated.
  •  01-25-2006, 4:06 PM 15131 in reply to 15130

    Re: the right time to dynamically set links in Linktree ddl

    Nevermind...answered my own question...

    Looks like the best time to do this in on the Editor1_Initialized event
  •  01-25-2006, 4:13 PM 15134 in reply to 15131

    Re: the right time to dynamically set links in Linktree ddl

    You can also put it into the Page_Load event.
     

     
    Public Sub Page_Load(sender As object, e As System.EventArgs)
     
      If Not Page.IsPostBack Then
       If Not Editor1.ToolControls("LinkTree") Is Nothing Then
        Dim tdd As CuteEditor.TreeDropDownList
        Dim richitem As CuteEditor.RichListItem
        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:'asp.net")
        rootitem.Items.Add("DotNetNuke.Net","DotNetNuke.Net","http:'DotNetNuke.com")
        rootitem.Items.Add("CuteSoft","CuteSoft","http:'CuteSoft.net")
       End If
      End If
     End Sub

    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