ui-grid
ui-grid copied to clipboard
Populate editDropdownOptionsArray with json object
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:
- Pass a json/array(in this case) to $scope.myvalue,
- assign $scope.myvalue to 'Gender' column via editDropdownOptionsArray.
Here is the plunker. http://plnkr.co/edit/5rv1qtZLCFWGOPMhZQeO?p=preview
Thanks.
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'
Thank you very much.