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

rad Calendar Issue in Dynamically Created Dock

1 Answer 63 Views
This is a migrated thread and some comments may be shown as answers.
Naga Sridhar madiraju
Top achievements
Rank 1
Naga Sridhar madiraju asked on 27 Apr 2010, 11:06 AM


I am facing calendar issue in Custom Control in dynamically loaded RadDocks. In my dashboard what I am doing is selecting Custom Control  from dropdown and loading it to RadDockZone dynamically. For this I have 2 static RadDockZones and I am creating RadDock dynamically, loading Custom Control to Raddock .

Now the problem is my Calendar in Custom Control does not fire any events selection changed or any navigating to a diff month etc

The calendar is displaying in Rad Dock with the following code snippet

 dock.UniqueName = Guid.NewGuid().ToString().Replace('-', 'a'); 

But any event related to calendar is not firing.

If i try to change the Month from Calendar the Rad Dock layout is completely disappeared

Any Fix for the Problem?


Naga Sridhar Madiraju

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 29 Apr 2010, 11:57 AM
Hi Naga,

I created a sample project based on the MyPortal demo, and all of the client-side events that I tested get fired. Here is the code of the User Control:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadCalendar ID="Calendar1" runat="server">
    <ClientEvents OnCalendarViewChanged="OnCalendarViewChanged" OnDateSelected="OnDateSelected" />
<div id="divScript" runat="server">
    <telerik:RadCodeBlock ID="CodeBlock1" runat="server">
        <script type="text/javascript">
            function OnCalendarViewChanged(calendar, args)
                alert("OnCalendarViewChanged fired");
            function OnDateSelected(calendar, args)
                alert("OnDateSelected fired");

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace MyPortal
    public partial class Default : System.Web.UI.UserControl
        protected void Page_Load(object sender, EventArgs e)
            var script = String.Format("$telerik.evalScripts($get('{0}'));", divScript.ClientID);
            ScriptManager.RegisterStartupScript(this, this.GetType(), "evalScripts", script, true);

The full source code is attached to the thread.

Kind regards,
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Asked by
Naga Sridhar madiraju
Top achievements
Rank 1
Answers by
Telerik team
Share this question