| <telerik:RadToolBar ID="ToolbarQuickLinks" runat="server" CausesValidation="False" OnButtonClick="ToolbarQuickLinks_ButtonClick" Skin="Office2007"> | |
| <CollapseAnimation Duration="200" Type="None" /> | |
| <Items> | |
| <telerik:RadToolBarButton runat="server" CheckOnClick="True" CommandArgument="Yesterday" | |
| Text="Yesterday" Value="Yesterday" CausesValidation="False"> | |
| </telerik:RadToolBarButton> | |
| <telerik:RadToolBarButton runat="server" CheckOnClick="True" CommandArgument="CurrentWeek" | |
| Text="Current Week" Value="CurrentWeek" CausesValidation="False"> | |
| </telerik:RadToolBarButton> | |
| <telerik:RadToolBarButton runat="server" CheckOnClick="True" CommandArgument="LW" | |
| Text="LW" Value="LW" CausesValidation="False"> | |
| </telerik:RadToolBarButton> | |
| <telerik:RadToolBarButton runat="server" CheckOnClick="True" Text="Last 4 Weeks" | |
| CommandArgument="L4" Value="L4" CausesValidation="False"> | |
| </telerik:RadToolBarButton> | |
| <telerik:RadToolBarButton runat="server" CheckOnClick="True" Text="Last 13 Weeks" | |
| CommandArgument="L13" Value="L13" CausesValidation="False"> | |
| </telerik:RadToolBarButton> | |
| </Items> | |
| <ExpandAnimation Type="None" /> | |
| </telerik:RadToolBar> |
| <telerik:RadToolBar ID="UserAccessEditToolBar" runat="server"/> |
| <script type="text/javascript"> |
| <%= UserAccessEditToolBar.ClientID %>.attachEvent("OnClientClick","click_handler"); |
| function click_handler(sender, e) |
| { |
| if (sender.CommandName == "clientside") |
| { |
| // call clientside function here |
| return false; |
| } |
| } |
| </script> |
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.
<div id="rightContentDiv" class="rightContenDiv">
<div class="pageContent" >
<telerik:RadHtmlField DisplayHeight="200px"
DisplayWidth="100%" FieldName="PageContent2"
runat="server" id="RichHtmlField1" >
</telerik:RadHtmlField>
</div>
</div>
.rightContenDiv
{
float:right;
width:259px;
}
.pageContent
{
font-family:tahoma;
font-size:10pt;
color:#5B5B5B;
}
Thanks
Mark