Cant use template attribute (grid-column)

2 posts, 0 answers
  1. Vaidas
    Vaidas avatar
    3 posts
    Member since:
    Apr 2013

    Posted 16 Apr 2013 Link to this post

    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.
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 16 Apr 2013 Link to this post

    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!
  3. UI for ASP.NET AJAX banner
Back to Top