Reputation: 404
How to set placeHolder (optionCaption in the select) in knockout-kendo multiselect
HTML:
<select data-bind="kendoMultiSelect: { data: doc, value: selecteddoc}"></select>
Upvotes: 0
Views: 544
Reputation: 408
Seems you already know about optionsCaption in the classic Knockout way. Kendo-ui doesn't provide a placeholder apparently.
What you can try is to add an extra first value, and hide it on open.
$dropdownElement.getKendoDropDownList().list.find("li.item").first().hide();
// Classic knockout way just in case
<select data-bind="options: optionsArray, optionsCaption: 'My Caption placeholder ... ', selectedOptions: SelectedOptionsArray" size="5" multiple="true" multiple></select>
Otherwise you can always refer to this.
Is there a way to add a placeholder to a text field in KendoUI Grid?
Upvotes: 2