Kendo UI 模板点击绑定不工作 telerik 平台

Kendo UI template click bind not working telerik platform

我已经纠结了几个小时了,也许有人能帮帮我,我已经阅读了所有 Whosebug 的答案,但似乎没有任何效果。

我完全删除了 kendo-模板,看看它是否有帮助,但没有骰子..

我现在已经将 jsfiddle 中的所有代码最小化为: http://jsfiddle.net/Lyzz1t1x

(function () {
var app = kendo.observable({
    onShow: function () {},
    afterShow: function () {}
});

// START_CUSTOM_CODE_home
// Add custom code here. For more information about custom code, see http://docs.telerik.com/platform/screenbuilder/troubleshooting/how-to-keep-custom-code-changes

var test = [{
    "code": "1234",
    "name": "test1"
}, {
    "code": "4525",
    "name": "test535"
}, {
    "code": "6346",
    "name": "dadsd"
}];
app.productlist = {
    data: new kendo.data.DataSource({data:test}), 
  listener: function(e){ console.log('aaaa')}
  };

//If no customerid is set navigate to the settings page
app.listener = function (e) {
    console.log("Event: " + e.type);
};


kendo.bind($('#main'), app);
// END_CUSTOM_CODE_home
})();

那个不行

这个是:

http://jsfiddle.net/qd2sr9y6

(function () {

    var viewModel = kendo.observable();
    var test =  [{
            id: 1,
            name: 'Bill',
            tasks: ['Task 1', 'Task 2']
        }, {
            id: 2,
            name: 'John',
            tasks: ['Task 3']
        }, {
            id: 3,
            name: 'Josh',
            tasks: ['Task 4', 'Task 5', 'Task 6']
        }];


    viewModel.demoData = test;
viewModel.listener = function(e){
console.log('aa');
}
    kendo.bind('#container', viewModel);

})();

唯一的区别,一个是使用 kendo 数据源,但我需要一个 kendo 数据源来加载远程 json 数据,谁能解释为什么我的点击处理程序停止使用kendo 数据源?

我通过将可观察对象放入 var app.home 并将数据源放入 app.productList

来解决这个问题
(function () {
var app = {};
app.home = kendo.observable({
    onShow: function () {},
    afterShow: function () {}
});

// START_CUSTOM_CODE_home
// Add custom code here. For more information about custom code, see http://docs.telerik.com/platform/screenbuilder/troubleshooting/how-to-keep-custom-code-changes

var test = [{
    "code": "1234",
    "name": "test1"
}, {
    "code": "4525",
    "name": "test535"
}, {
    "code": "6346",
    "name": "dadsd"
}];
app.productlist = {
    data: new kendo.data.DataSource({data:test}), 
  listener: function(e){ console.log('aaaa')}
  };

//If no customerid is set navigate to the settings page
app.listener = function (e) {
    console.log("Event: " + e.type);
};


kendo.bind($('#main'), app);
// END_CUSTOM_CODE_home
})();

http://jsfiddle.net/L1b6abjy/