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

Ajax call Scheduler into modal popup

2 Answers 53 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 26 Apr 2012, 03:26 PM
We have an MVC 3 application where we needed to use the Rad Scheduler. We basically render out the control and stick it into a view. This is working fine. 

However now we have a situation where we need to render the scheduler to a modal popup. Basically in the modal we do an ajax GET request which grabs the rendered control and sets the innerHTML of the modal to the ajax response. 

After setting the innerHTML all of the scheduler markup seems to be there including script tags and viewstate. The calendar is rendered in the modal, looks great. However it doesn't do anything. Click events aren't working, cant change months, etc.

My guess is that there are some DOM events or something that allow the calendar to work from the full page load but not from the ajax call. I haven't figured it out exactly. But my question is, is there some way to ajax load the control and then from the clients side trigger some code that causes the scheduler to run all of its javascript (or do whatever it needs to do) and start working?

I realize this was not the intended use of the control but any suggestions would be greatly appreciated!

2 Answers, 1 is accepted

Sort by
0
Jason
Top achievements
Rank 1
answered on 26 Apr 2012, 03:28 PM
Oh i should mention it works if we use an iframe in the modal. But we really don't want to use an iframe. 
0
Peter
Telerik team
answered on 27 Apr 2012, 07:34 AM
Hi Jason,

RadScheduler depends on JavaScript to function properly. You need to make sure the JavaScript resources are added to the page. Here is a help topic that shows how to do this manually -
http://www.telerik.com/help/aspnet-ajax/introduction-disabling-embedded-resources.html

Greetings,
Peter
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
Jason
Top achievements
Rank 1
Answers by
Jason
Top achievements
Rank 1
Peter
Telerik team
Share this question
or