if (e.field == "total") {
var price = record.price;
var quantity = record.quantity;
e.cellHtml = price * quantity;
}
}
function onDrawSummaryCell(e) {
var result = e.result;
var grid = e.sender;
var rows = e.data;
if (e.field == "total") {
var total = 0;
for (var i = 0, l = rows.length; i < l; i++) {
var row = rows[i];
var t = row.price * row.quantity;
if (isNaN(t)) continue;
total += t;
}