If there is no data I want my users to know, that there are no options anymore.
Otherwise I just do a jquery.html() on that element. But it would be nice if I can set it with the API
5 Answers, 1 is accepted
Generally speaking, you can add the optionLabel after init. You just need to recreate items of the drop-down list. Other option is to use the text method of the DropDownList to set the text of the span element. Check this jsFiddle demo, which shows the both approaches.
As a side note, I will suggest you open support tickets for your incedents. Thus our support team can handle the problems faster. We also do not guarantee answers in the forum threads.
the Telerik team
I have a requirement to have an optional label on a dropdownlist that has the datasource changed dynamic. I have updated your demo with the latest version of kendo and it does not work.
What do I need to do to make it work?
Instead of setting the optionLabel like this:
you can use the setOptions API method to set it:
Thank you, it works with your solution.