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

Content template with JSON data - how to?

5 Answers 170 Views
Window
This is a migrated thread and some comments may be shown as answers.
Paola
Top achievements
Rank 1
Paola asked on 17 Jun 2015, 06:13 PM

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

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 22 Jun 2015, 06:25 AM
Hi Paola,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Paola
Top achievements
Rank 1
answered on 24 Jun 2015, 05:53 PM

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.

0
Accepted
Alex Gyoshev
Telerik team
answered on 26 Jun 2015, 07:54 AM

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Paola
Top achievements
Rank 1
answered on 14 Dec 2015, 05:08 PM

Hi,

any news about it?

Best regards.

0
Accepted
Alex Gyoshev
Telerik team
answered on 16 Dec 2015, 04:03 PM

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Window
Asked by
Paola
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Paola
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Share this question
or