I want to make a dynamically populated html select for a select cell. I extract some information from a database which is different for every row item. The problem is that t
I can't add comments yet, but I need to add something to HeiN's answer.
HeiN's answer works great, but I have data coming in that does not match my select options and I need to still display that data... so I have had to modify dataItemColumnValueExtractor in the options. This allows my original data to display if I do not have an option in the list to match.
dataItemColumnValueExtractor: function(item, columnDef) {
if(columnDef.editor == Slick.Editors.SelectOption){
return eval(columnDef.options)[item[columnDef.field]] != null ? eval(columnDef.options)[item[columnDef.field]] : item[columnDef.field];
}else{
return item[columnDef.field];
}
}
Hope this helps somebody later down the line.