I have a template that returns the name of the template when loaded.
<div><ul id="inspectionlist"></ul></div>
<script id="attachment-template" type="text/x-kendo-template"> <table class="instable"> <tr class="insrow"> <td class="inscell1"><label>#: RiskAssessment #</label></td> <td class="inscell2"><label>#: AreaDescription #</label></td> <td class="inscell3"># if (HasAttachments) { # <a data-role="button" data-click="onClick">VIEW</a> # } #</td> </tr> </table></script>
var ourList = e.view.content.find("#inspectionlist"); ourList.kendoListView({ template: 'attachment-template', style: "inset", dataSource: new kendo.data.DataSource({ type: 'everlive', transport: { typeName: 'dbo_Inspection' }, schema: { model: { id: Everlive.idField, fields: { 'RiskAssessment': { type: 'number' }, 'AreaDescription': { type: 'string' }, 'HasAttachments': { type: 'boolean' }, 'StatusDescription': { type: 'string' }, 'CompanyId': { type: 'number' } } } }, serverFiltering: true, filter: { logic: "and", filters: [ { field: 'CompanyId', operator: 'eq', value: sessionStorage.CompanyId }, { field: 'StatusDescription', operator: 'eq', value: 'Open' } ] }, serverSorting: true, sort: { field: 'AreaDescription', dir: 'asc' } }) });What returns looks like the following:
attachment-templateattachment-templateattachment-templateattachment-templateattachment-templateattachment-templateattachment-templateattachment-templateattachment-templateattachment-templateattachment-templateattachment-Can I assume I have something wrong with the template and if so could someone point it out.
Thanks