Click here to Skip to main content
15,886,860 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have custom Kendo UI template in which i have for loop. Into the for loop i want to data bind text from the value.

Any suugestions or workaround?

What I have tried:

HTML
          <div id="test"></div>

<script id="template1" type="text/x-kendo-template">
    # for (var i = 0; i < ViewData.length; i++) { #
        <ul class="listSelector clearFix">
         
        <li>
           <a href="#" data-bind="click: function() { select(ViewData[i]); }, css: { selected: ViewData]i]  == change() }"> ---> dont work - i is Undefined
                ${ DateRange.format(Date.parse(ViewData[i].start), Date.parse(ViewData[i].end)) } 
                <br />
                <span>${ Countdown.ToDate(Date.parse(ViewData[i].closedOn)) }</span>
            </a>
        </li>
          <li>  
              <span data-bind="text: ViewData[i].start"></span>  ---> dont work - i is Undefined
          </li>
        </ul>
    # } #
</script>
Posted
Updated 30-Jun-16 23:22pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900