Hello,
I have a basic listview, bound to a dataSource(JS array of objects), with an item template that contains a switch,
Ex:
<script id="listItemTemplate" type="text/x-kendo-template">
<div>
<a> #=name# </a>
<input type="checkbox" #if(data.selected) { # checked #}# data-role="switch" data-bind="checked: selected" />
</div>
</script>
The list is rendered corectly, however the switch data binding does not seem to be working.
Had to specify the [#if(data.selected) { # checked #}#], otherwise it woudn't have set the checked state corectly.
I expect 2 way binding. Thiking this should work.
Am i doing something wrong?
Regards
I have a basic listview, bound to a dataSource(JS array of objects), with an item template that contains a switch,
Ex:
<script id="listItemTemplate" type="text/x-kendo-template">
<div>
<a> #=name# </a>
<input type="checkbox" #if(data.selected) { # checked #}# data-role="switch" data-bind="checked: selected" />
</div>
</script>
The list is rendered corectly, however the switch data binding does not seem to be working.
Had to specify the [#if(data.selected) { # checked #}#], otherwise it woudn't have set the checked state corectly.
I expect 2 way binding. Thiking this should work.
Am i doing something wrong?
Regards