0
observableArray로 설정된 데이터 소스로 igComboBox를 만들었습니다. 배열에 항목을 추가 할 때 self.datasource : sourceListArray()를 명시 적으로 설정할 필요없이 콤보 상자의 데이터 소스가 자동으로 새 값을 가져 오도록합니다. 이것을 어떻게 할 수 있습니까?녹아웃으로 IgniteUI 콤보 상자 데이터 소스 업데이트
self.sourceListArray = ko.observableArray();
$("#dataSource").igCombo({
allowCustomValue: false,
showDropDownButton: true,
enableClearButton: false,
dataSource: self.sourceListArray(),
nullText: "Select Data Source",
selectionChanged: self.dataSourceChanged
});
function PopulateSourceList(sourceList) {
for (var i = 0; i < sourceList.length; i++) {
self.sourceListArray.push(sourceList[i].ServiceName);
}
$("#dataSource").igCombo({ dataSource: self.sourceListArray() }); //don't want this
}