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

Template not compiling

1 Answer 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Harjit
Top achievements
Rank 1
Harjit asked on 16 Aug 2013, 04:07 PM
Hi there,

I have the following template defined in the page

<script id="templ" type="text/x-kendo-template">

    #var gridID = ceFeature.config.currentGrid#
#console.log(gridID)#

    # var columns = $("\\#" + gridID).data("kendoGrid").columns #
#console.log(columns)#

    <tr data-uid="#= uid #" role='row' style="outline: 1px solid rgba(0, 0, 0, 0.15);">
        #for(properties in columns) {#
       # if (properties != 'remove') {#
        #if (columns[properties].field == 'Id' || columns[properties].field == 'Hidetype') {#
        <td role="gridcell" style="display:none;">#=data[columns[properties].field] #</td>
        #}else {#
        #if (data[columns[properties].field] != undefined) {#

        #if (data[columns[properties].field].typeText == null) {#
        <td role="gridcell" data-types= "#= data[columns[properties].field].types #" data-begin="#= data[columns[properties].field].beginOffset #" data-end="#= data[columns[properties].field].endOffset #">#= data[columns[properties].field].val #</td>
        #} else {#

        <td role="gridcell" data-types= "#= data[columns[properties].field].types #" data-begin="#= data[columns[properties].field].beginOffset #" data-end="#= data[columns[properties].field].endOffset #">#= data[columns[properties].field].typeText #</td>
        #}#
        #}#

        #}#
        #}#
        #}#
    </tr>
</script>

but I keep getting the error

Template.compilekendo.web.js:272b.extend.proxy.b.isFunction.ijquery-1.9.1.min.js:3processTablejsbin.html:319processChildrenjsbin.html:85(anonymous function)jsbin.html:107b.extend.eachjquery-1.9.1.min.js:3b.fn.b.eachjquery-1.9.1.min.js:3processChildren


attaching file for reference



1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 20 Aug 2013, 11:00 AM
Hi Harjit,

I'm afraid that I'm unable to observe such error using the provided code. Here is the test page with small modification in order to make it runnable. Feel free to modify it in order the issue to appear.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Harjit
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or