that $NaN.00 issue is caused by the built-in Ext.util.Format.usMoney() method, which always assumes valid numbers are passed in.
use this override to fix that issue
this is easily achieved via a custom summaryRenderer (like the one i used to display the total no. of companies).Code:Ext.util.Format.usMoney = function(v) { // override Ext.util.usMoney
v = Ext.num(v, 0); // ensure v is a valid numeric value, otherwise use 0 as a base (fixes $NaN.00 appearing in summaryRow when no records exist)
v = (Math.round((v - 0) * 100)) / 100;
v = (v == Math.floor(v)) ? v + ".00" : ((v * 10 == Math.floor(v * 10)) ? v + "0" : v);
v = String(v);
var ps = v.split('.');
var whole = ps[0];
var sub = ps[1] ? '.'+ ps[1] : '.00';
var r = /(\d+)(\d{3})/;
while (r.test(whole)) {
whole = whole.replace(r, '$1' + ',' + '$2');
}
v = whole + sub;
if (v.charAt(0) == '-') {
return '-$' + v.substr(1);
}
return "$" + v;
}
this is also easily achieved via a custom summaryRenderer. i've updated the example above with an example for the "Change" column.
thanks for the feedback ;)
[edit]
fixed minor problem with toggleSummary

