views:

53

answers:

1

I have an ExtJS grid connected to a store. When I add a thumbnail column with an <img> tag inside store, grid shows 0. Is there some kind of html filtering? If I change the store data to something without html tags it shows fine. Excuse my awful English and thanks in advance.

+1  A: 

some time ago we put img in cell like this:

Column model:

{ header: "", dataIndex:'thumb', width:0.1, renderer:this.makeImg.createDelegate(this) }

Where this.makeImg():

makeImg:function(val, cell, record){
    var data = record.data;
    return '<img src="'+val+'" title="'+data.name+'" width="75" />';

},
Skay
BTW - You could add "scope: this" instead of creating a delegate for the renderer
ob1
ob1, yeap, you are right. Setting scope is better in this situation.
Skay