Hi,
I need to show a Window with a template as its content; the data will be JSON.
In other words, I need almost the same code showed in http://docs.telerik.com/kendo-ui/api/javascript/ui/window#configuration-content.template but using the ASP.NET MVC server wrappers.
I've searched the documentation, the demos and the forum but without any luck.
Can you help me with some code, please?
Thank you.
5 Answers, 1 is accepted
Currently the MVC wrapper of the Window widget doesn't support the "content.template" option - however you can initialize the widget using JavaScript when you need the option.
<div id=
"dialog"
>
<p><strong>This example will not work, unless you define a valid JSON service URL
for
`content.url`.</p>
<p>The expected JSON response
is
:
<pre>
{ username:
"...my username here..."
}
</pre>
</strong></p>
</div>
<script>
$(
"#dialog"
).kendoWindow({
content: {
url:
"@(Url.Action("
Index
", "
Home
"))"
,
dataType:
"json"
,
iframe:
false
,
template:
"User name: #= data.username #"
}
});
</script>
Also you can share your idea at Kendo UI UserVoice to allow other users vote for it. Most voted ideas are included in next Kendo UI releases.
Regards,
Vladimir Iliev
Telerik

Thanks for the reply.
However I am not satisfied because I think UserVoice should be used mainly to propose new functions and widgets and not to collect votes to convince you to implement functions that, in my opinion, should be normal for the server-side wrappers to have.
I'm quite disappointed that they do not allow you to have the full functionality of the JavaScript counterpart: after all, you pay for them.
Hello Paola,
You are right. This is an already known problem (logged internally). We have raised its priority so that it gets fixed soon. For an immediate workaround, use the approach provided by my colleague.
Regards,Alex Gyoshev
Telerik

Hi,
any news about it?
Best regards.
Hello Paola,
This functionality is scheduled for the Q1 release in January. You can try it out in the beta release that will be released next week.
Regards,Alex Gyoshev
Telerik