如何获取 radgrid 模板列总抛出 javascript 代码隐藏。
问问题
531 次
1 回答
0
我解决了她是脚本的问题
function ValueChanged(sender, args) {
var grid = $find("<%=grd.ClientID %>");//grid id
var totalAmount = 0;
if (grid) {
var MasterTable = grid.get_masterTableView();
var Rows = MasterTable.get_dataItems();
var footer = grid.get_masterTableViewFooter().get_element();
//footer.rows[0].cells[1].innerHTML = 'My Footer Text'; // Set the footer text
var TotalQnty = 0;
var TotalNetAmount = 0;
for (var i = 0; i < Rows.length; i++) {
var row = Rows[i];
var txtIND_QTY = row.findControl("txtgrdIndentQty");//gridcolumns
var txtNetAmount =Number(row.findControl("txtgrdNetamount"));
TotalQnty = TotalQnty + parseFloat(txtIND_QTY.get_value());
TotalNetAmount = TotalNetAmount + txtNetAmount;
}
footer.rows[0].cells[2].innerHTML = "Rs. "+TotalQnty;
footer.rows[0].cells[6].innerHTML = "Rs. "+TotalNetAmount;
alert(TotalQnty);
alert(TotalNetAmount);
}
}
于 2012-08-20T04:42:06.400 回答