We have a kendoAutoComplete field where we need the autocomplete list to have column titles at the top. The AutoComplete documentation describes as headerTemplate property that take a string or a function.
I am assigning html to the headerTemplate property. But it does not appear with the autocomplete list. Nor are the header items present when I search the DOM for those header items.
The headerTemplate is our only issue with autoComplete. Please let us know how we can fix or at least work around this issue.
Code...
$this.kendoAutoComplete({
placeholder: settings.placeholder,
minLength: settings.minLength,
dataSource: settings.dataSource,
dataTextField: settings.dataTextField,
delay: settings.delay,
height: settings.listHeight,
highlightFirst: settings.highlightFirst,
select: function (e) {
//console.log("autocomplete select");
if (settings.onSelect)
settings.onSelect(this.dataItem(e.item.index()));
},
close: function(e) {
if (settings.onClose)
settings.onClose(e);
},
dataBound: function(e) {
if (settings.onDataBound)
settings.onDataBound(e);
},
open: function (e) {
if (settings.onOpen)
settings.onOpen(e);
},
template: settings.contentTemplate,
headerTemplate: settings.headerTemplate
});
Suffice to say, I am confident that the value of settings.headerTemplate is valid html
Thanks,
Rod Early
McKesson, Inc.
I am assigning html to the headerTemplate property. But it does not appear with the autocomplete list. Nor are the header items present when I search the DOM for those header items.
The headerTemplate is our only issue with autoComplete. Please let us know how we can fix or at least work around this issue.
Code...
$this.kendoAutoComplete({
placeholder: settings.placeholder,
minLength: settings.minLength,
dataSource: settings.dataSource,
dataTextField: settings.dataTextField,
delay: settings.delay,
height: settings.listHeight,
highlightFirst: settings.highlightFirst,
select: function (e) {
//console.log("autocomplete select");
if (settings.onSelect)
settings.onSelect(this.dataItem(e.item.index()));
},
close: function(e) {
if (settings.onClose)
settings.onClose(e);
},
dataBound: function(e) {
if (settings.onDataBound)
settings.onDataBound(e);
},
open: function (e) {
if (settings.onOpen)
settings.onOpen(e);
},
template: settings.contentTemplate,
headerTemplate: settings.headerTemplate
});
Suffice to say, I am confident that the value of settings.headerTemplate is valid html
Thanks,
Rod Early
McKesson, Inc.