When I bind this element: <select data-role="dropdownlist" data-option-label="Select an item" />
the optionLabel is not used.
This is because optionLabel is not in the default DropDownList.options object.
If I add the field optionLabel: "" to it, then the attribute is used correctly.
Due to the way the binding is working all possible configuration options must be in the default options object of the widget else it will not be possible to read the attribute in kendo.initWidget.
I can imagine that is applies to other options and to other widgets also.
Regards, Jaap
the optionLabel is not used.
This is because optionLabel is not in the default DropDownList.options object.
If I add the field optionLabel: "" to it, then the attribute is used correctly.
Due to the way the binding is working all possible configuration options must be in the default options object of the widget else it will not be possible to read the attribute in kendo.initWidget.
I can imagine that is applies to other options and to other widgets also.
Regards, Jaap
6 Answers, 1 is accepted
0
Accepted
Hi,
Atanas Korchev
the Telerik team
Right on target. We will fix that for the official release. Keep the great feedback coming!
Regards,Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Jaap
Top achievements
Rank 2
answered on 26 Mar 2012, 08:31 AM
I can confirm this is fixed in the release version.
Thanks, Jaap
Thanks, Jaap
0

Chaitali
Top achievements
Rank 1
answered on 04 Feb 2013, 12:24 PM
0
Hi,
Georgi Krustev
the Telerik team
The described issue is already addressed and the fix is included in the last internal build of Kendo UI. I will suggest you give it a try.
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Kevin
Top achievements
Rank 1
answered on 19 Jun 2015, 08:07 PM
Can we bind data-option-label or template with observable ?
data-option-label="data-bind= html:varObservabel"
Or
data-option-label="varObservable"
var viewModel = kendo.observable({
varObservable:"select somthing..."
});
0
Hello Kevin,
Widget does not expose built-in MVVM binding for optionLabel update. I would suggest you implement a custom MVVM binding that tackles this functionality. Basically, it will need to update the optionLabel of the widget using its setOptions method.
Regards,
Georgi Krustev
Telerik
Widget does not expose built-in MVVM binding for optionLabel update. I would suggest you implement a custom MVVM binding that tackles this functionality. Basically, it will need to update the optionLabel of the widget using its setOptions method.
Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!