Bump! I noticed that the renderer() function has been removed from the new version. Is there any way I can preformat the data from my store? This would be a very useful addition to the plugin.
Thanks!
Printable View
I made a small workaround by extending the Ext.DataView. I added the following lines of code after line 135 (version 2.0b1):
Seems to work quite okay!Code:prepareData:function(recordData, ri, record) {
for (var i = 0; i < colModel.length; i++) {
var col = colModel[i];
if(typeof col.renderer == 'function') {
recordData[col.mapping] = col.renderer.apply(this, [recordData[col.mapping]]);
}
}
return recordData;
}
This seems to work better! 8)
Code:prepareData:function(recordData, ri, record) {
if(recordData.rendered) return recordData;
for (var i = 0; i < colModel.length; i++) {
var col = colModel[i];
if(typeof col.renderer == 'function') {
recordData[col.mapping] = col.renderer.apply(this, [recordData[col.mapping]]);
}
}
recordData.rendered = true;
return recordData;
}
Is there a way to "scrollTo" to a specific table row?
Hi Mitch!
The renderer function seems to break when you apply sorting on the columns. Each time the user clicks on the columns to perform a sort, the cell is rendered.
For example, my price column becomes $$$$1 after sorting a few times.
The same seems to happen on your demo, but it's not so visible. After sorting a few times, the "Change" column values get some additional code:
<span style="color: #FF0000;"><span style="color: #FF0000;"> ... </span></span>
Cheers!