I'm using Kendo UI (latest version) with Knockout-Kendo (0.6.3) and Knockout (2.3.0) and I have a complex situation with an autocomplete where I am attempting to map the input typed into the autocomplete field (a numeric string) to a complex data type on the backend in Javascript.
I don't think all the details are relevant at this point as my problem is understanding how to properly use a named Knockout template with any Kendo UI control other than a grid (because I have that one working). Essentially I'm trying to style the autocomplete suggestion dropdown based on the the input entered into the autocomplete.
Essentially I've tried this:
<input data-bind="kendoAutoComplete: { data: paymentSubCodeCodeList, value: paymentSubCodeCode, template: { name: 'mail_mailPaymentEntry-section_subcode-autocomplete', data: paymentSubCodeCode } }" />
but this locks up and throws a javascript knockout error saying object does not support "replace".
I've also tried
template: $('#mail_mailPaymentEntry-section_subcode-autocomplete').html()
and
template: '<div>#: data #</div>'
The first one works to create a template but I cannot access any knockout data. The second one works with data but data is just the value I selected and I need access to associated ViewModel.
Make sense?