I am using a RadScheduler control in a MVC application, using a web service. I am trying to change the appointment template. I have followed this demo: http://demos.telerik.com/aspnet-ajax/scheduler/examples/webservice/defaultvb.aspx, but am getting this javascript error when trying to debug: "Microsoft JScript runtime error: Object doesn't support property or method 'tmpl'"
This error occurs on this line of code:
Here is my code. As far as I can see I have included everything I should need for this to run correctly. What is causing the javascript error?
This error occurs on this line of code:
$("#tmplAppDescription").tmpl(tmplValue).insertBefore(this);
Here is my code. As far as I can see I have included everything I should need for this to run correctly. What is causing the javascript error?
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> <asp:ScriptReference Path="~/Scripts/jquery.tmpl.js" /> </Scripts> </telerik:RadScriptManager> <telerik:RadScheduler ID="RadScheduler1" runat="server" SelectedView="WeekView" StartEditingInAdvancedForm="False" EnableDescriptionField="True" Height="600px" AppointmentStyleMode="Default" Skin="WebBlue" OnClientDataBound="onSchedulerDataBound" > <WebServiceSettings Path="../../SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" /> </telerik:RadScheduler>
<script id="tmplAppDescription" type="text/x-jquery-tmpl"><div style='font-style:italic;'>${Description}</div></script> <script type="text/javascript"> function onSchedulerDataBound(scheduler) { var $ = jQuery; $(".rsAptDelete").each(function () { var apt = scheduler.getAppointmentFromDomElement(this); var tmplValue = { Description: apt.get_description() }; $("#tmplAppDescription").tmpl(tmplValue).insertBefore(this); }); } </script>