[suite-pro] combobox in a grid can't batch put options, only 1 after 1


#1

var combobox = function(colTypes, colNames, dropdown) {
for(var i=0; i<colTypes.length; i++) {
if(‘co’ == colTypes[i]) {

        var combo = docGrid.getCombo(i);
        combo.put("sd","3 Hour"); //works right

     var colCombo = docGrid.getColumnCombo(i);        

// colCombo.load(dropdown[colNames[i]]); // works nothing
// dropdown =[{value:‘v1’,text:‘t1’},{value:‘v2’,text:‘t2’}]
// colCombo.addOption(dropdown[colNames[i]]); //works nothing
}
}
}


#2

Please, note that the “co”/“coro” is not a dhtmlxCombo object.
If you need to use a complete version of the dhtmlxCombo in dhtmlxGrid please, try to use the “combo” column type:
https://docs.dhtmlx.com/grid__combo_integration.html
It supports load() method.