Hello Kendo,
I just used the following test code with kendo DropDownList mvvm as to your demo:
<script>
$(function() {
var vm = kendo.observable({
dropdownlistSource: [
{ text: 'True', value: true },
{ text: 'False', value: false }
],
selected: null
});
vm.selected = vm.dropdownlistSource[1];
kendo.bind($('body'), vm);
});
</script>
</head>
<body>
<input data-role="dropdownlist" data-text-field="text" data-value-field="value" data-bind="source: dropdownlistSource, value: selected" />
</body>
However, the widget just display the first item every time, not the value demonstrated in data-bind attr. When i switch the value field of data source to interger 1 and 0, that works perfect.
I think this would be a bug in your control, and please pay attention to it when u r free.
Wenhao
I just used the following test code with kendo DropDownList mvvm as to your demo:
<script>
$(function() {
var vm = kendo.observable({
dropdownlistSource: [
{ text: 'True', value: true },
{ text: 'False', value: false }
],
selected: null
});
vm.selected = vm.dropdownlistSource[1];
kendo.bind($('body'), vm);
});
</script>
</head>
<body>
<input data-role="dropdownlist" data-text-field="text" data-value-field="value" data-bind="source: dropdownlistSource, value: selected" />
</body>
However, the widget just display the first item every time, not the value demonstrated in data-bind attr. When i switch the value field of data source to interger 1 and 0, that works perfect.
I think this would be a bug in your control, and please pay attention to it when u r free.
Wenhao