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

Client Side Handles on Server Bound Scheduler

3 Answers 55 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Michael Cunningham
Top achievements
Rank 1
Michael Cunningham asked on 16 Mar 2012, 06:02 PM
I'm doing some client side manipulation of calendar events after the server side schedule has been populated.

This works on the initial load but if I try paging between months my rewrite (Tied to
$(document).ready) never gets fired because of the Ajax scheduler is using.

Is there a code sample showing a js handler that can detect a Scheduler ajax call?

Control is server bound.

Thanks

Michael




3 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 21 Mar 2012, 12:40 PM
Hi Michael,

If RadScheduler is using server-side binding, your code tied to $(document).ready should be executed whenever you change the view or current month of RadScheduler.

Here is my testing locally with RadScheduler bound to xml provider on Page_Init:
<script type="text/javascript">
    $telerik.$(document).ready(function () {
        alert("document ready");
    });
</script>
<telerik:RadScheduler runat="server" ID="RadScheduler1">
</telerik:RadScheduler>

What exactly is your scenario? What is the code that you need to execute when the DOM of the page is fully loaded?

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.
0
Michael Cunningham
Top achievements
Rank 1
answered on 21 Mar 2012, 05:01 PM
Ivana,

It's a DotnetNuke  site using Invenmanagers Event Modules.

I am writing JS to replace the text  of some events based on their CSS style.

It works fine on initial load but since it's panelized Document.Ready isn't getting fired when I use the schedulers navigation controls.

I was hoping that scheduler fired its own completed js event.

Page is at: http://www.mdrealtor.org/Education/StatewideEducationCalendar.aspx

without my JS.

Thanks!

Michael

0
Ivana
Telerik team
answered on 26 Mar 2012, 03:22 PM
Hi Michael,

The following JS code should fix your problem:
$telerik.$(document).ready(docReady);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(docReady);
function docReady() {
    alert("hallo");
}

The $telerik.$(document).ready can not be executed directly because of the callback( not a full postback) that occurs when RadScheduler is navigating trough its views.

Kind regards,
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
Michael Cunningham
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Michael Cunningham
Top achievements
Rank 1
Share this question
or