<
input
id
=
"coursecats"
style
=
"width:400px;"
/>
$(
"#coursecats"
).kendoDropDownList({
index: 0,
dataTextField:
"Title"
,
dataValueField:
"CourseID"
,
filter:
"contains"
,
dataSource: courses
});
Note: The courses variable is already set on the page and works fine with the Grid and AutoComplete already on the page.
Seems like there is a lot of detail missing from the docs. Are there beta docs somewhere we can access and see more details on the widgets?
9 Answers, 1 is accepted
The DropDownList will support option label in the next official release of KendoUI scheduled for the end of January 2012. For now you can add item on the client. Check this jsFiddle demo for more information.
We are working to improve our documentation and will update it as soon as possible.
Georgi Krustev
the Telerik team
http://www.kendoui.com/forums/ui/dropdownlist/drop-down-display-text.aspx
If you simply want to change whats displayed and not add an actual element to the list you can do something like:
var data = $(
"#coursecats"
).kendoDropDownList({
index: 0,
dataTextField:
"Title"
,
dataValueField:
"CourseID"
,
filter:
"contains"
,
dataSource: courses
});
data.text("-- Please Select --");
I am using Kendo UI 2012.1.229.beta
optionLabel:"Please Select..." Works for me....
see below:
var data = $(
"#coursecats"
).kendoDropDownList({
index: 0,
dataTextField:
"Title"
,
dataValueField:
"CourseID"
,
filter:
"contains"
,
dataSource: courses
,optionLabel: "Please Select..."
,});
Kendo UI ComboBox supports placeholder functionality. If you would like to use an option label, then I will suggest you use the DropDownList widget with filtering (available since Q2 2014).
Regards,
Georgi Krustev
Telerik
I agree with you that absolute uniformity would be good to have, and I am sorry that this feature name has caused you difficulties.
To help with such queries and avoid such searches, we offer a lot of online demos and API reference documentation where you can see how different features are called so you can copy from them towards your actual project. I hope that skimming through them will let you see how a certain feature is used/called in the future so you can find that information quickly and efficiently.
For historical reasons (read - to avoid breaking changes) we can't alter that feature name now, though. I hope you understand. After all, only the dropdowns, charts and inputs are several sets of very similar widgets, the rest 50+ are rather unique.
Regards,
Marin Bratanov
Progress Telerik