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.
views:
53answers:
1
+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
2010-07-13 21:47:48
BTW - You could add "scope: this" instead of creating a delegate for the renderer
ob1
2010-07-14 06:03:06
ob1, yeap, you are right. Setting scope is better in this situation.
Skay
2010-07-15 00:04:05