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

Cant use template attribute (grid-column)

1 Answer 201 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vaidas
Top achievements
Rank 1
Vaidas asked on 16 Apr 2013, 10:34 AM
Hi,

we are currently evaluating Kendo UI JSP wrapper for possible usage in upcoming project. There is one issue I can not seem to find documentation of how to solve.
How can I use "template" attribute  of <kendo:grid-column > without writing html as text. I find example with grid's "rowTemplate" and it works by just specifying ID of script tag, however for  grid-column  this does not work. I know for sure, that for ASP.NET it is posible.

For example, this works fine, but It does not satisfy our needs:
<kendo:grid name="grid" pageable="true" height="430px" sortable="true" filterable="false" selectable="true" change="onChange" editable="false" >
     ...
     <kendo:grid-columns>
        ...
        <kendo:grid-column title="Marking" field="priorityHigh" width="80px" template="<b>TEST</b>" />
        ...
     </kendo:grid-columns>
     ...
</kendo:grid>

However how to make something like this to work:

<script id="testTemplate1" type="text/x-kendo-template">
     <b>TEST</b>
</script>
<kendo:grid name="grid" pageable="true" height="430px" sortable="true" filterable="false" selectable="true" change="onChange" editable="false" >
     ...
     <kendo:grid-columns>
          ...
          <kendo:grid-column title="Marking" field="priorityHigh" width="80px" template="testTemplate1" />
          ...
     </kendo:grid-columns>
     ...
</kendo:grid>


Thanks.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 16 Apr 2013, 11:49 AM
Hello Vaidas,

 This is not supported. The column template cannot be set to the ID of a <script> element. The ASP.NET MVC version doesn't support this as well.

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