Reputation: 12431
I have a dropdown list created using kendo library. I have added a option label default text which I want to show on load by default. If I use a select element to initialize a dropdown it does not work nicely but when I use input type as text then it work.
HTML:
<select id="size">
<option>S - 6 3/4"</option>
<option>M - 7 1/4"</option>
<option>L - 7 1/8"</option>
<option>XL - 7 5/8"</option>
</select>
JS:
$("#size").kendoDropDownList({
optionLabel: " -- Select -- "
});
Here is the jsfiddle: http://jsfiddle.net/42DkV/
Upvotes: 2
Views: 18774
Reputation: 57105
Try
$("#size").kendoDropDownList({
optionLabel: " -- Select -- "
}).data("kendoDropDownList").select(0); //select(index) , index starts from 0
Upvotes: 7
Reputation: 539
Try this:
$("#size").kendoDropDownList({
optionLabel: " -- Select -- ",
value:"-- Select --"
});
Upvotes: 2