valuePrimitiveBoolean(default: false)
Specifies the value binding behavior for the widget. If set to true, the View-Model field will be updated with the selected item value 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 value
<div id="container">
<select id="multiselect" multiple="multiple"
data-bind="value: selectedProductId, source: products"></select>
<div>
<h4>Selected Product IDs:</h4>
<div data-bind="text: selectedProductIdText"></div>
</div>
</div>
<script>
$("#multiselect").kendoMultiSelect({
valuePrimitive: true,
dataTextField: "name",
dataValueField: "id"
});
var viewModel = kendo.observable({
selectedProductId: [],
selectedProductIdText: function () {
return this.get("selectedProductId").join(", ");
},
products: [
{ id: 1, name: "Coffee" },
{ id: 2, name: "Tea" },
{ id: 3, name: "Juice" }
]
});
kendo.bind($("#container"), viewModel);
</script>