Hi,
I am adding a <div> and html table for a sparkline within a grid column renderer.
How can I add a on click listener to that div (string) within the renderer, since it won't yet be added to the DOM ?
Thanks !
simplified code...
Code:
columnSparklineRenderer: function(value, metaData, record, rowIndex, colIndex, store) {
var myData = record.get('usefulStuff'),
sparkline = '<div id="' + "sparkline" + idValue + '" class="f-myGrid-sparkline"><table><tr>';
for(var i=0; i<myData.length; i++) {
var cellData = myData[i],
cellClass = 'myCellClass';
sparkline += '<td style="width:5px" class="' + cellClass + '"></td>';
}
sparkline += '</tr></table></div>';
return sparkline + '<div style="font-weight:bold">' + value + '<div>';
},
Aucun commentaire:
Enregistrer un commentaire