小编use*_*616的帖子

包含模板的自定义命令的AngularJS kendo网格不处理事件

我有一个angularjs - 基于剑道UI网格的解决方案.在网格的控制器中,我放置了以下代码:

$scope.customClick = function(e) {       
    $scope.$apply(
                function() {
                    e.preventDefault();
                    alert('customClick');
                });
}; 

$scope.gridOptions = {
    dataSource: $scope.gridData,
    pageable: {
        refresh: true,
        pageSizes: true,
        buttonCount: 5
    },
    scrollable: true,
    sortable: true,
    filterable: true,
    selectable: true,
    editable: "inline",
    columns: [
        {
          command :[ {text: "", template: '<input type="checkbox" id="check-all"  />', click: $scope.customClick} ]

        },
        {field: "DocumentKey", title: "Document Key"},
        {field: "Sender", title: "Sender"},
        {field: "Recipient", title: "Recipient"},
        {field: "ChangeDate", title: "ReceivedBy Time"},
        {field: "FlowComment", title: "Comment"},
        {field: "Location", title: "Location"} …
Run Code Online (Sandbox Code Playgroud)

javascript angularjs kendo-grid

4
推荐指数
1
解决办法
5241
查看次数

标签 统计

angularjs ×1

javascript ×1

kendo-grid ×1