这些天在群里混:看到网友的效果:列汇总
如何实现呢?
写个JS统计
function GridSum() { var grid = Ext.getCmp('GpItem'); var sumPrice = 0.00; var record = grid.record; grid.store.each(function (record) { sumPrice += record.data.Price; }); var n = grid.getStore().getCount(); var p = new Ext.data.Record({ Name: "总计:", Price: ""+RMBMoney(sumPrice)+"" }) grid.store.insert(n, p); grid.store.commitChanges(); GpItem.getView().getRow(n).style.backgroundColor &