Hi,
I have a kendo-template which i put my Calendar widget in it. I tried to open the Window and load the template into my calendar end up having error and below are the error:
Here is my Code:
My template
Here is my Javascript that execute the code:
kendo.init($("#details-container"));
var wnd = $("#Details").data("kendoWindow");
wnd.content(detailsTemplate);
wnd.center().open();
Any Idea how to get working?
thanks.
Regards,
I have a kendo-template which i put my Calendar widget in it. I tried to open the Window and load the template into my calendar end up having error and below are the error:
Error: Invalid template:'
<div id="details-container">
<div class="k-widget k-calendar" id="test"></div><script>
jQuery(function(){jQuery("#test").kendoCalendar({});});
' Generated code:'var o,e=kendo.htmlEncode;with(data){o='\n <div id="details-container">\n <div class="k-widget k-calendar" id="test"></div><script>\n\tjQuery(function(){jQuery("';test").kendoCalendar({});});
;o+=;}return o;'Here is my Code:
@(Html.Kendo().Window().Name("Details").Title("Customer Details") .Visible(false).Modal(true).Draggable(true).Width(900).Height(400))My template
<script type="text/x-kendo-template" id="CopyProjectTemplate"> <div id="details-container"> @(Html.Kendo().Calendar().Name("test")) </div></script>Here is my Javascript that execute the code:
$(document).ready(function () {
$("#grdTimelogDetail_btnSaveTemplate_onclick").click(function (e) {
e.preventDefault(); try { var detailsTemplate = kendo.template($("#CopyProjectTemplate").html());kendo.init($("#details-container"));
var wnd = $("#Details").data("kendoWindow");
wnd.content(detailsTemplate);
wnd.center().open();
return false; } catch (err) { alert(err); } }); });
Any Idea how to get working?
thanks.
Regards,
