This is a migrated thread and some comments may be shown as answers.

DNN 4.5.1.28 & Runtime Load RadDock Prometheus Object

1 Answer 50 Views
Dock
This is a migrated thread and some comments may be shown as answers.
luca bongioanni
Top achievements
Rank 1
luca bongioanni asked on 28 May 2007, 07:00 AM

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

1 Answer, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 28 May 2007, 07:48 AM
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
Tags
Dock
Asked by
luca bongioanni
Top achievements
Rank 1
Answers by
Lini
Telerik team
Share this question
or