DNN 4.5.1.28 & Runtime Load RadDock Prometheus Object

2 posts, 0 answers
  1. luca bongioanni
    luca bongioanni avatar
    16 posts
    Member since:
    May 2007

    Posted 28 May 2007 Link to this post

    Hi telerik,

    i would like to create a RadDock Prometheus Object at runtime in a module on DNN 4.5.1.28 (with ajax support)..

    There is a problem (a javascript error) when i click on the PinupPinCommand.

    The error was: "Sys.InvalidOperationException: Two components with the same id 'dnn_ctr383_Module_RadDock1' can't be added to the application."

    But i clear all the controls in placeholder after adding a new control.

    --- ASCX PAGE ---
    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="Module.ascx.vb" Inherits="_Module" %>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    </
    asp:UpdatePanel>

    --- ASCX.VB CODE PAGE ---

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim RadDock As New RadDock
    RadDock.ID =
    "RadDock1"
    RadDock.DockMode = DockMode.Floating
    RadDock.Pinned =
    False
    RadDock.Title = "My RadDock"
    RadDock.Left = Unit.Pixel(400)
    RadDock.Top = Unit.Pixel(400)
    RadDock.Collapsed =
    False

    RadDock.UniqueName = Guid.NewGuid().ToString()
    Dim DockPinUnpinCommand As New DockPinUnpinCommand
    DockPinUnpinCommand.AutoPostBack =
    True
    RadDock.Commands.Add(DockPinUnpinCommand)RadDock.Commands.Add(New DockExpandCollapseCommand)

    AddHandler RadDock.Command, AddressOf RadDock_Command

    Dim AsyncPostBackTrigger As New AsyncPostBackTrigger
    AsyncPostBackTrigger.ControlID = RadDock.ID
    AsyncPostBackTrigger.EventName =
    "Command"

    Dim UpdatePanelContent As New UpdatePanel
    RadDock.ContentContainer.Controls.Add(UpdatePanelContent)UpdatePanelContent.Triggers.Add(AsyncPostBackTrigger)UpdatePanel1.ContentTemplateContainer.Controls.Clear()UpdatePanel1.ContentTemplateContainer.Controls.Add(RadDock)

    End Sub

     

    Protected Sub RadDock_Command(ByVal sender As Object, ByVal e As DockCommandEventArgs)
    'write into DB the RadDock's positions (Left and Top)
    End Sub


    Thanks in advice

  2. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 28 May 2007 Link to this post

    Hi,

    We have already answered your support ticket about this issue. I will close this thread so we can continue the conversation in one place.

    All the best,
    Lini
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top