Is it possible to render an image in an extJS4 qtip for a grid cell? I’ve tried the following code:
// col defs here
{
text : 'File Name',
width : 75,
sortable : true,
dataIndex: 'filename',
renderer: function(value,metaData,record,colIndex,store,view) {
metaData.tdAttr = 'data-qtip="<img src=\"img.jpg\">"';
return value;
}
},
It seems incorrect to assign an html tag to an attribute, but I can’t think of any other approach. In any event; it’s not working. Any ideas?
Thanks in advance!
What you have tried seems a good approach – how exactly is it not working? (Maybe you just need to define an absolute URL for the image?) Anyways, another (and a bit cleaner) option would be to assign a CSS class to the metadata object, and define the image URL in CSS.