[Answered ]-How to add a column for displaying small size of img inside backgrid.

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

Leave a comment