ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Populate editDropdownOptionsArray with json object

Open coffeetime96 opened this issue 12 years ago • 2 comments

I am trying to populate a cell with dropdown list from a json object. But I have failed to get it to work. It should be very simple, but I am stuck. Any help will be appreciated.

Here is what I try to do:

  1. Pass a json/array(in this case) to $scope.myvalue,
  2. assign $scope.myvalue to 'Gender' column via editDropdownOptionsArray.

Here is the plunker. http://plnkr.co/edit/5rv1qtZLCFWGOPMhZQeO?p=preview

Thanks.

coffeetime96 avatar Oct 30 '14 18:10 coffeetime96

Try this: http://plnkr.co/edit/ZW2t9ZbKofpXW5ueKxuR?p=preview

I move $scope.myvalue before you used it, but I don't think this was essential.

I set the dropdownOptionsArray to $scope.myvalue, not '$scope.myvalue'

PaulL1 avatar Oct 30 '14 19:10 PaulL1

Thank you very much.

coffeetime96 avatar Oct 31 '14 20:10 coffeetime96