Hi all, Hope I'm asking this in the right place. I'm using this example from Telerik but am having no luck at all getting the NoDataTemplate to show. Add new item in jQuery ComboBox Widget Demo | Kendo UI for jQuery[^] My cshtml looks like this (there's a form tag higher up in case that's important):
<div>
No data found. Do you want to add new item - '#: instance.text() #' ?
</div>
<br />
<button class="k-button" onclick="addNew('#: instance.element[0].id #', '#: instance.text() #')">Add new item</button>
And my initialization of the combobox looks like this:
BCA.Configurator.CodeStringSegment.LoadSegmentGroups = function () {
var crudServiceBaseUrl = BCA.rootUrl + "eConfigurator";
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: crudServiceBaseUrl + "/PrConf/RetrieveSegmentGroups",
dataType: "json",
type: "POST"
},
},
schema: {
model: {
id: "Key",
fields: {
Key: { type: "number" },
Value: { type: "string" }
}
}
}
});
$("#SegmentGroup").kendoComboBox({
filter: "startswith",
dataTextField: "Value",
dataValueField: "Key",
dataSource: dataSource,
placeholder: "Select Pricing Group",
noDataTemplate: $("#noDataTemplate").html(),
filtering: BCA.Configurator.CodeStringSegment.CheckForNewSegmentGroup,
});
}
When I type "cf" (because I know nothing in the list starts with that combination of letters) absolutely nothing happens that I can see. Any idea why? Thanks in advance, all,
Denise