【发布时间】:2016-10-13 14:14:14
【问题描述】:
我想为我的 ui-grid 的每一行设置一个不同的下拉数组。因此我需要访问当前行。我有这样的想法,但我不知道如何访问 columnDefs 中的当前行。有没有简单的方法来实现这一点?
columnDefs: [
{ name: "id", field: "id"},
{ name: "firends", field: "friends", editableCellTemplate: 'ui-grid/dropdownEditor', editDropdownOptionsArray: findFriendsForId(row.id)
]
var findFriendsForId = function(id) {
// find friends and return them as array
}
【问题讨论】:
-
我认为你需要的是 ng-model="row.entity.id"
标签: angularjs angular-ui-grid ui-grid