0

我想为我的 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
}
4

1 回答 1

0

好的,我自己想通了。有一个名为 editDropdownOptionsFunction的函数。

是一个例子。

于 2016-11-03T12:59:25.510 回答