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

javascript event on scheduler data population

1 Answer 40 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Pooja
Top achievements
Rank 1
Pooja asked on 17 Jan 2012, 02:12 AM
Hi,

My scheduler control is inside a user control, I am populating it from code behind using a custom class, now when calendar finishes populating data , I want to fire a javascript metod. Please let me know how to achieve this.

1 Answer, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 19 Jan 2012, 03:17 PM
Hello,

You could subscribe to the server-side OnDataBound event of RadScheduler, and register a script in its handler -- as shown in the example below:

protected void RadScheduler1_DataBound(object sender, EventArgs e){
    String cstext1 = "<script type=\"text/javascript\">" +
        "alert('Data bound finished!');</" + "script>";
    String csname1 = "PopupScript";
    RegisterStartupScript(csname1, cstext1);
}
<telerik:RadScheduler runat="server" ID="RadScheduler1"
    OnDataBound="RadScheduler1_DataBound">
</telerik:RadScheduler>

I hope it helps.

All the best,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Scheduler
Asked by
Pooja
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Share this question
or