call javascript functions inside the for loop in Template

2 posts, 0 answers
  1. Zareena
    Zareena avatar
    1 posts
    Member since:
    Aug 2015

    Posted 25 Aug 2015 Link to this post

     Is it possible to call a javascript function (formatData) inside the for loop in the template, inside the ## , like below..

     <script id="javascriptTemplate" type="text/x-kendo-template"><ul># for (var i = 0; i < data.length; i++) { #<li>#= formatData(data[i]) #</li># } #</ul></script>

  2. Alexander Valchev
    Alexander Valchev avatar
    2895 posts

    Posted 27 Aug 2015 Link to this post

    Hi Zareena,

    Yes this is possible. You may find examples in the templates overview help topic (search for 'External Templates and Expressions').

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