Q:

kendo template

<!-- 
The following code creates a kendo template built with html.
The function Open can be used with any template by just providing the id
and the item object.
-->

<button type="button"
        onclick="
            Open('#template', {
                'item': {
                    'name': 'Pop up window'
                }
            })" >
	Open
</button>

<script type="text/x-kendo-template" id="template" data-title="template">
    <span class="label">
        You opened the template '${ item.name }'.<br />
        Are you sure you want to continue?
    </span>

    <div class="manualDialogButtons">
        <button type="button" class="k-button k-primary"
            onclick="DoSomething(); Kendo.Dialog.Close(this)">
            Close
        </button>
    </div>
</script>

<script> 
function DoSomething() { alert("template was closed"); }

function Open(popup, item) {
    var dlg = Kendo.Dialog.FromTemplate($(popup), item, { minWidth: 500 });
    dlg.open();
}
 </script>
0

New to Communities?

Join the community