저는 ui-grid v3.2.9를 사용합니다. 편집 셀 - 드롭 다운 컨트롤 중 하나 인 인라인 편집 기능이있는 격자가 있습니다. 이 셀을 클릭 할 때마다 드롭 다운 컨트롤을위한 배열을 가져오고 싶습니다.
columnDefs: [
{
name: 'serial',
displayName: 'Serial',
width: 100,
enableCellEdit: true,
editableCellTemplate: 'ui-grid/dropdownEditor',
editDropdownIdLabel: 'id',
editDropdownValueLabel: 'id',
editDropdownOptionsFunction: function(rowEntity, colDef){
var res = [];
$http.get('index.php?r=docs/serialsjson2&recid=' + rowEntity.id)
.success(function (data) {
res = data;
});
return res;
}
},
],
을하지만 이해 $ http.get 너무 늦게 끝나면 더 채우기 dropdownarray하지 : 나는 드롭을 위해 JSON을 다운로드 editDropdownOptionsFunction를 사용하려고합니다. 도와주세요. 순간 클릭으로 서버에서 드롭 다운 위젯에 대한 요청 데이터를 어떻게 처리해야합니까?