I have a grid in which I am adding active dom content into each cell. As of now, I am adding it as html text inside the column renderer:
renderer:function(data) {
str = "";
Ext.each(data,function(paragraph,i) {
str += '<div onclick="Ext.getCmp(\'grid\').paragraphClick('+paragraph.get("Id")+');">'+paragraph.get("Text")+'</div>'
});
return str;
}
I should mention that data
is a record field which contains another list of records.
Now, I guess you'll call this the "worst ExtJS code you have ever seen". That's fair.
But how would I do this in an ExtJS-conforming way, using Ext elements and listeners?