Please Note: This is a solution rather than a question.
On the following example:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Dock/Examples/MyPortal/DefaultCS.aspx
The following javascript error throws if you are using master pages:
Microsoft JScript runtime error: 'null' is null or not an object.
This is caused by the following line:
ScriptManager.RegisterStartupScript(dock, Me.[GetType](), "AddDock", String.Format("function _addDock() {{" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "Sys.Application.remove_load(_addDock);" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "$find('{1}').dock($find('{0}'));" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "$find('{0}').doPostBack('DockPositionChanged');" & Chr(13) & "" & Chr(10) & "}};" & Chr(13) & "" & Chr(10) & "Sys.Application.add_load(_addDock);", dock.ClientID, DropDownZone.SelectedValue), True)
DropDownZone.SelectedValue is referenced which will return RadDockZone1 instead of the required RadDockZone1.ClientID.
There are a few solutions to this problem but i found the best one was to populate the Rad Dock selector at runtime.
Simply add the following code to the page load:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
If Not Page.IsPostBack Then |
For Each item As ListItem In DropDownZone.Items |
Dim obj As Web.UI.Control = RadDockLayout1.FindControl(item.Value) |
If obj IsNot Nothing Then |
item.Value = obj.clientID |
End If |
Next |
End If |
End Sub |
If a better solution is avalible please post it here.