2๐
โ
I would recommend you to create new image cell type. However, the simplest solution is to extend the basic Backgrid.Cell
:
{
name: 'active_image',
label: 'Image',
editable: false,
cell: Backgrid.Cell.extend({
render: function() {
var src = this.model.get(this.column.get('name'));
this.$el.html($('<img>').attr('src', src));
return this;
}
})
}
The render function here is rather simplified (and not tested), just to give the idea of howto.
๐คpekkast
Source:stackexchange.com