Currently I'm having this kind of issue when creating a dynamic raddock and adding the treeview control on it. I also followed this demo http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx but still having a problem during expanding the treeview control or clicking on it.
The message says "The target 'ct100$ContentPlaceHolder1$RadDock3$C$Treeview1' for the callback could not be found or did not implement ICallBackEventHandler."
Please let me know how to find a way on this..
Here are my sample codes:
Private
Sub LivelinkTreeView(ByVal treeview As RadTreeView)
Dim rootNode As New RadTreeNode()
rootNode.Text = hdnFundName.Value
rootNode.Value = hdnFundObjectID.Value
rootNode.ImageUrl = "~\App_Themes\Image\main.png"
rootNode.Width = "25"
rootNode.Height = "25"
rootNode.Expanded = True
rootNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack
treeview.Nodes.Add(rootNode)
End Sub
Private Function CreateRadDock(ByVal c As Control, ByVal dockName As String, ByVal iCount As Integer) As RadDock
Dim docksCount As Integer = CurrentDockStates.Count
Dim dock As New RadDock()
dock.ID =
String.Format("RadDock" & iDockCount, iDockCount)
dock.Title =
String.Format(dockName)
dock.Font.Bold =
True
dock.UniqueName = Guid.NewGuid().ToString()
dock.Width = Unit.Percentage(100)
dock.Skin =
"Web20"
dock.OnClientInitialize = "OnClientInitialize"
dock.Attributes.Add("Style", "margin-top:10px;margin-left:10px")
dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.ExpandCollapse
dock.EnableDrag =
False
dock.EnableRoundedCorners = True
dock.EnableAnimation = True
dock.ContentContainer.Controls.Add(c)
Return dock
End Function
Private Sub CreateDockDocumentInformation()
LivelinkTreeView(rtvLivelink)
Dim dock As RadDock = CreateRadDock(Treeview1, "Document Information", icnt)
RadDockZone1.Controls.Add(dock)
iDockCount += 1
CreateSaveStateTrigger(dock)
LoadWidget(dock)
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CreateDockDocumentInformation()
End If
End Sub
Private Sub LoadWidget(ByVal dock As RadDock)
If String.IsNullOrEmpty(dock.Tag) Then
Return
End If
Dim widget As Control = LoadControl(dock.Tag)
dock.ContentContainer.Controls.Add(widget)
End Sub
Private Sub CreateSaveStateTrigger(ByVal dock As RadDock)
dock.AutoPostBack = True
dock.CommandsAutoPostBack = True
Dim saveStateTrigger As New AsyncPostBackTrigger()
saveStateTrigger.ControlID = dock.ID
saveStateTrigger.EventName =
"DockPositionChanged"
UpdatePanel1.Triggers.Add(saveStateTrigger)
saveStateTrigger =
New AsyncPostBackTrigger()
saveStateTrigger.ControlID = dock.ID
saveStateTrigger.EventName =
"Command"
UpdatePanel1.Triggers.Add(saveStateTrigger)
End Sub
Is there any limitation on this on binding the treeview control on the dynamic raddock?
Thanks,
Allan