valuePrimitive Boolean
(default: false)
Specifies the value binding behavior for the widget when the initial model value is null. If set to true, the View-Model field will be updated with the selected item text field. If set to false, the View-Model field will be updated with the selected item.
Example - specify that the View-Model field should be updated with the selected item text
<input id="autocomplete" data-bind="value: productName, source: products" />
<script>
$("#autocomplete").kendoAutoComplete({
valuePrimitive: true,
dataTextField: "name"
});
var viewModel = kendo.observable({
productName: null,
products: [
{ id: 1, name: "Coffee" },
{ id: 2, name: "Tea" },
{ id: 3, name: "Juice" }
]
});
kendo.bind($("#autocomplete"), viewModel);
</script>