9 Answers, 1 is accepted
Could you provide a repro demo or steps to replicate the issue locally? This will help us to narrow the problem down and provide a fix much faster.
Regards,
Georgi Krustev
Telerik

Hi Georgi,
Below is a snippet of the code in my html file. I have these items inside of a kendo template which the viewmodel is bound to:
<
div
class
=
"col5-sm col16-md-4"
>
<
select
class
=
"cycle"
data-role
=
"combobox"
data-text-field
=
"name"
data-value-field
=
"value"
data-bind
=
"source: cycles, value: planDetails.selectedBillingCycleID"
>
</
select
>
</
div
>
$(document).ready(function(){
app.servicesPlansData.viewModel.getServicePlans(function() {
kendo.bind($('#page-wrap'), app.servicesPlansData.viewModel);
});
});
And Below is part of the viewmodel i have created. I am working with a complex json object (which at the moment is locally stored.
(
function
(global) {
var
servicesPlansViewModel,
app = global.app = global.app || {};
servicesPlansViewModel = kendo.data.ObservableObject.extend({
servicePlans :
""
,
configDetails:
""
,
cycles: [{ name:
"Weekly"
, value:
"Weekly"
},
{ name:
"Monthly"
, value:
"Monthly"
},
{ name:
"Quarterly"
, value:
"Quarterly"
},
{ name:
"Semi-Annually"
, value:
"Semi-Annually"
},
{ name:
"Bi-Annually"
, value:
"Bi-Annually"
}],
getServicePlans:
function
(callback) {
var
that =
this
;
$.ajax({
url:
'services-data.json'
,
type:
'get'
,
dataType:
'json'
,
error:
function
(response){
console.log(
'error'
)
},
success:
function
(response){
that.set(
"servicePlans"
, response.sPlans);
callback();
}
});
}
})
app.servicesPlansData = {
viewModel:
new
servicesPlansViewModel()
};
})(window);
You're help is very much appreciated.
Thanks.
I prepared a simple Dojo demo using the provided code snippet, but I couldn't replicate the issue. I suppose that the widget works as expected when the is bound directly. Would it be possible to modify the demo and replicate the issue?
As a side note, there is a known issue related to DDL and MVVM source binding with templates. If you think the depicted error is related, then upgrade to the next internal build that will be released till the end of week.
Regards,
Georgi Krustev
Telerik

Hello Georgi,
I am seeing this error in the console: "Uncaught TypeError: n.get is not a function". It appears your Dojo demo does replicate my exact issue. Would this be as a result to the known issue you pointed out?
I would suggest you upgrade to the latest internal build (2015.1.511) released last Friday, as the fix of the mentioned issue is included. If the problem still persists, then I suppose the issue is different and we will need repro demo that demonstrates the issue.
Regards,
Georgi Krustev
Telerik

Hi Georgi,
It look like the latest build is 2015.1.429 ? I've updated my cdn file to point to this build and now i'm receiving this error:
Uncaught Error: Invalid template:'#:data.name#' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput=''+$kendoHtmlEncode(data.name)+'';}return $kendoOutput;'
I'm not sure if this is related to the comboboxes?
The mentioned version does not include the fix. The latest internal build - 2015.1511 includes it. I would suggest you upgrade the scripts to that version.
Regards,
Georgi Krustev
Telerik

We upload only official releases (quarter or service pack releases) on CDN. Internal builds are not uploaded. If you would like to use the internal build, you will need to host the script locally.
Regards,
Georgi Krustev
Telerik