//加载成功之后,选定并获取首行数据
onLoadSuccess:function(data){
console.log(JSON.stringify(data));
console.log(data.rows[0].sumamount);
//var rows=$('#dg').datagrid("getRows")[0]; // 取第一行
//console.log(JSON.stringify(rows));
//$('#dg').datagrid('selectRow',0);//grid加载完成后自动选中第一行
//var row=$('#dg').datagrid("getSelections");//获取选中的数据
//console.log(JSON.stringify(row));
//for(var i=0;i<data.rows.length;i++)
//{
// // 遍历
//}
/*
var total_payamount = 0;
for(var i=0;i<data.rows.length;i++)
{
// 遍历
total_payamount = total_payamount + data.rows[i].payamount * 1;
$("#total_payamount").html('累计交易总额:' + total_payamount + ' 元,');
}
*/
},