"Invalid template" when initializing grid

7 posts, 0 answers
  1. Khalid Dermoumi
    Khalid Dermoumi avatar
    5 posts
    Member since:
    Oct 2009

    Posted 09 Mar 2012 Link to this post

    Hi!

    Im getting an "invalid template" exception when initializing a grid.

    This is the JS code:

    jQuery("#uipoc_readwrite_messagelist_table").kendoGrid();

    This is the complete exception message:

    Invalid template:'<tr><td>#=Betreff#</td><td>#=Absender#</td><td>#=Erhalten#</td><td>#=#</td><td>#=#</td></tr>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<tr><td>'+(Betreff)+'</td><td>'+(Absender)+'</td><td>'+(Erhalten)+'</td><td>'+()+'</td><td>'+()+'</td></tr>';}return o;'

    This is the html at the time the code is executed:

    <TABLE id=uipoc_readwrite_messagelist_table>
    <THEAD>
    <TR>
    <TH>Betreff</TH>
    <TH>Absender</TH>
    <TH>Erhalten</TH>
    <TH></TH>
    <TH></TH></TR></THEAD>
    <TBODY>
    <TR>
    <TD><A id=uipoc_readwrite_messagelist_b0ca6719-1984-4f3f-8be4-9d4c5eaba774 href="#uipoc_readwrite_messagelist_b0ca6719-1984-4f3f-8be4-9d4c5eaba774" jQuery171046139815295798753="5">dad about ship hot light ill keys something smoke

    something</A></TD>
    <TD>Karen Mayer</TD>
    <TD>07.02.2012 02:58:22</TD>
    <TD><BUTTON id=uipoc_readwrite_messagelist_answerMessage_b0ca6719-1984-4f3f-8be4-9d4c5eaba774 type=button jQuery171046139815295798753="6">Antworten</BUTTON></TD>
    <TD></TD></TR>
    <TR>
    <TD><A id=uipoc_readwrite_messagelist_08dda71c-e777-4436-82c8-634a779bfed0 href="#uipoc_readwrite_messagelist_08dda71c-e777-4436-82c8-634a779bfed0" jQuery171046139815295798753="7">out worn wicket on generated rabbit many ball to

    rescue</A></TD>
    <TD>Karen Mayer</TD>
    <TD>09.03.2012 20:50:01</TD>
    <TD><BUTTON id=uipoc_readwrite_messagelist_answerMessage_08dda71c-e777-4436-82c8-634a779bfed0 type=button jQuery171046139815295798753="8">Antworten</BUTTON></TD>
    <TD></TD></TR>
    <TR>
    <TD><A id=uipoc_readwrite_messagelist_e7d8b8f6-708d-4547-bd31-8c05d3be2a2e href="#uipoc_readwrite_messagelist_e7d8b8f6-708d-4547-bd31-8c05d3be2a2e" jQuery171046139815295798753="9">library are words always plane days to computer

    will</A></TD>
    <TD>Lindsey Craft</TD>
    <TD>11.01.2012 14:40:45</TD>
    <TD><BUTTON id=uipoc_readwrite_messagelist_answerMessage_e7d8b8f6-708d-4547-bd31-8c05d3be2a2e type=button jQuery171046139815295798753="10">Antworten</BUTTON></TD>
    <TD></TD></TR>
    <TR>
    <TD><A id=uipoc_readwrite_messagelist_5e64f31f-9cf1-413f-ae47-33816435e655 href="#uipoc_readwrite_messagelist_5e64f31f-9cf1-413f-ae47-33816435e655" jQuery171046139815295798753="11">smoke much many window this text of suspense died

    of</A></TD>
    <TD>Karen Mayer</TD>
    <TD>17.12.2011 17:26:42</TD>
    <TD><BUTTON id=uipoc_readwrite_messagelist_answerMessage_5e64f31f-9cf1-413f-ae47-33816435e655 type=button jQuery171046139815295798753="12">Antworten</BUTTON></TD>
    <TD></TD></TR>
    <TR>
    <TD><A id=uipoc_readwrite_messagelist_eb2b1d0b-6071-456b-a675-bed1a3055fd6 href="#uipoc_readwrite_messagelist_eb2b1d0b-6071-456b-a675-bed1a3055fd6" jQuery171046139815295798753="13">rescue asked leader pique to handled always

    captain</A></TD>
    <TD>Chasity Conway</TD>
    <TD>03.03.2012 19:41:40</TD>
    <TD><BUTTON id=uipoc_readwrite_messagelist_answerMessage_eb2b1d0b-6071-456b-a675-bed1a3055fd6 type=button jQuery171046139815295798753="14">Antworten</BUTTON></TD>
    <TD></TD></TR>
    <TR>
    <TD><A id=uipoc_readwrite_messagelist_311625ac-6b95-4c35-a6e0-79dbad0f62b3 href="#uipoc_readwrite_messagelist_311625ac-6b95-4c35-a6e0-79dbad0f62b3" jQuery171046139815295798753="15">others had constantly smoke will should worn when

    ending</A></TD>
    <TD>Nancy Stevens</TD>
    <TD>18.02.2012 07:47:57</TD>
    <TD><BUTTON id=uipoc_readwrite_messagelist_answerMessage_311625ac-6b95-4c35-a6e0-79dbad0f62b3 type=button jQuery171046139815295798753="16">Antworten</BUTTON></TD>
    <TD></TD></TR></TBODY></TABLE>

  2. Alexis
    Alexis avatar
    5 posts
    Member since:
    Feb 2012

    Posted 26 Mar 2012 Link to this post

    Any replies? I also have the same problem. I'm using kendo ui grid, backbone, underscore and require.js


    Filtered chrome url chrome://firebug/content/net/spy.js

    #Update

    anyway i solved it. It seems like when setting up columns for the grid it doesn't accept spaces. Is this a bug?
  3. johnny young
    johnny young avatar
    3 posts
    Member since:
    Jan 2010

    Posted 03 Oct 2012 Link to this post

    is no a bug, just attribute "field" is a without space, "title" if accept space.

    last comment solved the error.

    thanks ;)
  4. Robbie
    Robbie avatar
    1 posts
    Member since:
    Feb 2013

    Posted 03 Jan 2016 Link to this post

    I am also receiving a similar error: 

    Uncaught Error: Invalid template:'<tr data-uid="#=data.uid#" role='row'><td  role='gridcell'>#=data.eSpacelnkSortRichWidgets_List_SortColumnEspace[Name]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt62_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt62_block_wttxtTableRecordsId==null?'':data.eSpacelnkSortRichWidgets_List_SortColumnEspace[Name]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt62_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt62_block_wttxtTableRecordsId#</td><td  role='gridcell'>#=data.UploadedBylnkSortRichWidgets_List_SortColumnUser[Name]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt36_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt36_block_wttxtTableRecordsId==null?'':data.UploadedBylnkSortRichWidgets_List_SortColumnUser[Name]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt36_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt36_block_wttxtTableRecordsId#</td><td  role='gridcell'>#=data.UploadedDatelnkSortRichWidgets_List_SortColumnEspace_Version[Uploaded_Date]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt22_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt22_block_wttxtTableRecordsId==null?'':data.UploadedDatelnkSortRichWidgets_List_SortColumnEspace_Version[Uploaded_Date]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt22_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt22_block_wttxtTableRecordsId#</td><td  role='gridcell'>#=data.ValidlnkSortRichWidgets_List_SortColumnEspace_Version[Is_Valid]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt29_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt29_block_wttxtTableRecordsId==null?'':data.ValidlnkSortRichWidgets_List_SortColumnEspace_Version[Is_Valid]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt29_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt29_block_wttxtTableRecordsId#</td><td  role='gridcell'>#=data.ServiceStudioVersionlnkSortRichWidgets_List_SortColumnEspace_Version[Service_Studio_Version]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt4_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt4_block_wttxtTableRecordsId==null?'':data.ServiceStudioVersionlnkSortRichWidgets_List_SortColumnEspace_Version[Service_Studio_Version]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt4_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt4_block_wttxtTableRecordsId#</td><td  role='gridcell'>#=data.LastUpgradeVersionlnkSortRichWidgets_List_SortColumnEspace_Version[Last_Upgrade_Version]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt6_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt6_block_wttxtTableRecordsId==null?'':data.LastUpgradeVersionlnkSortRichWidgets_List_SortColumnEspace_Version[Last_Upgrade_Version]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt6_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt6_block_wttxtTableRecordsId#</td><td  role='gridcell'>#=data.BasedOnPreviouslnkSortRichWidgets_List_SortColumnEspace_Version[Based_On_Previous]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt56_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt56_block_wttxtTableRecordsId==null?'':data.BasedOnPreviouslnkSortRichWidgets_List_SortColumnEspace_Version[Based_On_Previous]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt56_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt56_block_wttxtTableRecordsId#</td></tr>' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput='<tr data-uid="'+(data.uid)+'" role=\'row\'><td  role=\'gridcell\'>'+(data.eSpacelnkSortRichWidgets_List_SortColumnEspace[Name]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt62_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt62_block_wttxtTableRecordsId==null?'':data.eSpacelnkSortRichWidgets_List_SortColumnEspace[Name]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt62_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt62_block_wttxtTableRecordsId)+'</td><td  role=\'gridcell\'>'+(data.UploadedBylnkSortRichWidgets_List_SortColumnUser[Name]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt36_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt36_block_wttxtTableRecordsId==null?'':data.UploadedBylnkSortRichWidgets_List_SortColumnUser[Name]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt36_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt36_block_wttxtTableRecordsId)+'</td><td  role=\'gridcell\'>'+(data.UploadedDatelnkSortRichWidgets_List_SortColumnEspace_Version[Uploaded_Date]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt22_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt22_block_wttxtTableRecordsId==null?'':data.UploadedDatelnkSortRichWidgets_List_SortColumnEspace_Version[Uploaded_Date]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt22_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt22_block_wttxtTableRecordsId)+'</td><td  role=\'gridcell\'>'+(data.ValidlnkSortRichWidgets_List_SortColumnEspace_Version[Is_Valid]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt29_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt29_block_wttxtTableRecordsId==null?'':data.ValidlnkSortRichWidgets_List_SortColumnEspace_Version[Is_Valid]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt29_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt29_block_wttxtTableRecordsId)+'</td><td  role=\'gridcell\'>'+(data.ServiceStudioVersionlnkSortRichWidgets_List_SortColumnEspace_Version[Service_Studio_Version]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt4_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt4_block_wttxtTableRecordsId==null?'':data.ServiceStudioVersionlnkSortRichWidgets_List_SortColumnEspace_Version[Service_Studio_Version]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt4_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt4_block_wttxtTableRecordsId)+'</td><td  role=\'gridcell\'>'+(data.LastUpgradeVersionlnkSortRichWidgets_List_SortColumnEspace_Version[Last_Upgrade_Version]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt6_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt6_block_wttxtTableRecordsId==null?'':data.LastUpgradeVersionlnkSortRichWidgets_List_SortColumnEspace_Version[Last_Upgrade_Version]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt6_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt6_block_wttxtTableRecordsId)+'</td><td  role=\'gridcell\'>'+(data.BasedOnPreviouslnkSortRichWidgets_List_SortColumnEspace_Version[Based_On_Previous]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt56_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt56_block_wttxtTableRecordsId==null?'':data.BasedOnPreviouslnkSortRichWidgets_List_SortColumnEspace_Version[Based_On_Previous]BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt56_block_wtlnkSortespacesBootstrapT_Sky_wt69_block_wtMainContent_wtEspaceVersionTableEspace_Version[Service_Studio_Version]DESCespaces2User[Name]ASCespaces2BootstrapT_Sky_wt67_block_wtMainContent_wtEspaceVersionTable_ctl02_RichWidgets_wt56_block_wttxtTableRecordsId)+'</td></tr>';}return $kendoOutput;'
    VM5606:545 Detected Kendo UI version: "2015.1.616"

     

    Any help would be appreciated. Thanks.

  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 07 Jan 2016 Link to this post

    Hello Robbie,

    Most probably you have not escaped hash literal (#). Check this help topic to learn how to escape the symbol. Usually (#) is used in href attributes and CSS color styles.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Gino
    Gino avatar
    1 posts
    Member since:
    Feb 2017

    Posted 29 Jun 2017 Link to this post

    Please help me I am getting the same issue here. It is just a very simple JSON structure.

    Uncaught Error: Invalid template:'<tr data-uid="#=data.uid#" role='row'><td  role='gridcell'>#:data.Till==null?'':data.Till#</td><td  role='gridcell'>#:data.1p==null?'':data.1p#</td><td  role='gridcell'>#:data.2p==null?'':data.2p#</td><td  role='gridcell'>#:data.5p==null?'':data.5p#</td><td  role='gridcell'>#:data.10p==null?'':data.10p#</td><td  role='gridcell'>#:data.20p==null?'':data.20p#</td><td  role='gridcell'>#:data.50p==null?'':data.50p#</td><td  role='gridcell'>#:data.£1==null?'':data.£1#</td><td  role='gridcell'>#:data.£2==null?'':data.£2#</td><td  role='gridcell'>#:data.£5==null?'':data.£5#</td><td  role='gridcell'>#:data.£10==null?'':data.£10#</td><td  role='gridcell'>#:data.£20==null?'':data.£20#</td><td  role='gridcell'>#:data.£50==null?'':data.£50#</td></tr>' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput='<tr data-uid="'+(data.uid)+'" role=\'row\'><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.Till==null?'':data.Till)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.1p==null?'':data.1p)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.2p==null?'':data.2p)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.5p==null?'':data.5p)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.10p==null?'':data.10p)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.20p==null?'':data.20p)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.50p==null?'':data.50p)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.£1==null?'':data.£1)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.£2==null?'':data.£2)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.£5==null?'':data.£5)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.£10==null?'':data.£10)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.£20==null?'':data.£20)+'</td><td  role=\'gridcell\'>'+$kendoHtmlEncode(data.£50==null?'':data.£50)+'</td></tr>';}return $kendoOutput;'

  7. Stefan
    Admin
    Stefan avatar
    2915 posts

    Posted 04 Jul 2017 Link to this post

    Hello Gino,

    This error can usually be caused by the following:

    - mismatching opening and closing code block characters (#) inside the template declaration
    - using a # character as a literal without escaping it with backslashes
    - nesting Kendo UI templates, which brings the need to escape non-literal # characters in the inner template, in order to "hide" them from the outer template

    These possible issues are discussed on the following page:

    http://docs.telerik.com/kendo-ui/framework/templates/overview

    I can also suggest removing parts of the used template to determine which one is causing the issue.

    If additional assistance is needed, please provide the template so we can inspect it locally and determine what may be causing the issue.

    Regards,
    Stefan
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top