0

I want to have a different dropdown array for each row of my ui-grid. Therefore I need to access the current row. I had something like this in mind but I don't know how to access the current row within columnDefs. Is there an easy way to achieve this?

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
}
Michael Woywod
  • 448
  • 4
  • 12

1 Answers1

0

Ok I figured it out by myself. There is a function called editDropdownOptionsFunction.

Here is an example of it.

Michael Woywod
  • 448
  • 4
  • 12