As the title suggests, I’m trying to dynamically populate a select editor in my datagrid using an associative array.
If I use:
$$(‘mygrid’).attachEvent(‘onBeforeEditStart’, function(selected){
var config = this.getColumnConfig(selected.column);
config.options = [
{ id: 0, value: ‘Test’ },
{ id: 1, value: ‘Test 2’ },
];
});
My select menu will just show [object Object] for all options. If I set the same array as the initial value in the column definition, it will work as expected. It seems to only affect this sort of dynamic population. Using a standard array or an object with key/value pairs works as expected when using the method described above.
Any suggestions? Thanks!