Hi,
This patch is replacement for our developed DynamicVariablecell.
Now we can pass cellFunction in column schema to get appropriate cell class.
User provided cellFunction must return valid cell class.
cellFunction will be called with context (this) as column and model as argument.
eg.:
schema: [
{id: 'name', label:'Name', type:'text', editable: false, cell: 'string'},
{
id: 'value', label:'Value', type: 'text', editable: true,
cellFunction: function(model){
if (isNaN(model.get(this.get('name')))) {
return "string";
} else {
return Backgrid.NumberCell;
}
}
},
{id: 'database', label:'Database', type: 'text', editable: false},
.
.
.
--
Harshal Dhumal
Software Engineer