I want to use template binding like below but its not working for me, can you please suggest whats wrong?
<div id="gridClientsOutside" data-bind="kendoGrid: { data: FilteredClients, columns: [ { field: 'ClientName', title : 'Client Name' }, { field: 'ClientCode', title: 'Client Code', **template:'<input type='button' value ='#= ClientCode #'></input>**' } ], scrollable: false, sortable: true, pageable: false }">
</div>
You would want to escape your quotes like:
<div id="gridClientsOutside" data-bind="kendoGrid: { data: FilteredClients, columns: [ { field: 'ClientName', title : 'Client Name' }, { field: 'ClientCode', title: 'Client Code', template: '<input type=\'button\' value=\'#= ClientCode #\' />' } ], scrollable: false, sortable: true, pageable: false }">
</div>
Sample here: http://jsfiddle.net/rniemeyer/zeQMT/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With