I unable to load dropdown values dynamically while using custom template. this is a generic template so that I can use any where in my application.
I have recently updated nggrid to ui-grid, and I am using custom templates for editing the grid row... unfortunately after updating ui-grid from ngGrid everything working fine except dropdown list.
Controller.js
vm.lov = {};
LovService.getCurrencies().then(function (data) {
vm.lov.Currency = data;
});
//Single column code in a grid
{
name: 'Currency',
editableCellTemplate: 'ui-grid/dropdownEditor',
editDropdownIdLabel: 'Id',
editDropdownValueLabel: 'Id',
editDropdownOptionsArray: vm.lov.Currency
},
dropdownEditor template
<select ng-class="'colt' + col.uid" ui-grid-edit-dropdown ng-model="MODEL_COL_FIELD" ng-options="field as field for field in editDropdownOptionsArray"></select>
I want to load items when user click on cell. This happened when I have updated from nggrid to ui-grid, I have spent lot of hours for finding the solutions but I can't, I hope stackoverflow is perfect for my to ask a question... Thanks in advance...