【发布时间】:2015-07-09 07:05:11
【问题描述】:
我在剑道网格中添加了两个额外的列,这些列在数据源中没有数据。我使用模板在这两列中添加了两个文本框。现在我想将这两列的值推送到一个角度数组 oncheckbox 选中。我在 google 和 stackoverflow 中搜索了很多关于此的内容。但是没有找到任何与我的问题相关的答案这是在剑道网格中添加模板的代码
$scope.qualifySubGridColumns = [
{ template: "<input type='checkbox' class='subCheck checkbox' ng-click='getSelectedRow(dataItem)' />" },
{ field: "subList", template: "<input type='number' ng-minlength='0' ng-init='prefferedUser.subList=0'>", title: "SubList" },
{ field: "level", template: '<input type="number" ng-model="prefferedUser.level" ng-minlength="0" ng-init="prefferedUser.level=0">', title: "Level" },
{ field: "lastName", title: "Last Name" },
{ field: "firstName", title: "First Name" },
{ field: "email", title: "Email" },
{ field: "address1", title: "Address 1" },
{ field: "address2", title: "Address 2" },
{ field: "phone", title: "Phone" }
];
在这里我想获取这些列。但我不知道如何在 selectedRow 数组中获取子列表和级别字段值。请高手帮帮我
$scope.selectedRow = [];
$scope.getSelectedRow = function (data) {
$scope.selectedRow.push({ userId: data.substituteId});
// $scope.selectedRow.push({ userId: data.substituteId, sublist: sublist, level: level });
console.log("mydata", $scope.selectedRow);
};
【问题讨论】:
标签: angularjs kendo-ui kendo-grid