2017-03-22 67 views

回答

2

看來你已經知道在經典的淘汰賽optionsCaption辦法。 Kendo-ui顯然不提供佔位符。

你可以嘗試的是添加一個額外的第一個值,並將其隱藏在打開狀態。 $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> 

否則你總是可以參考這個。
Is there a way to add a placeholder to a text field in KendoUI Grid?

+0

經典淘汰賽的方式不行! – Federico

+0

這是一個多選而不是DropDownList – Federico