|
- function onGetSummaryClick() {
- var grid1 = F.ui.Grid1;
- var fee1 = (grid1.summaryData["colFee1"] === undefined ? "undefined" : grid1.summaryData["colFee1"]);
- var fee2 = (grid1.summaryData["colFee2"] === undefined ? "undefined" : grid1.summaryData["colFee2"]);
- var donate = (grid1.summaryData["colDonate"] === undefined ? "undefined" : grid1.summaryData["colDonate"]);
- F.alert("显示的学费:" + fee1 + "<br/><font color='red'>" + "隐藏的学费:" + fee2 + "</font><br/>" + "捐赠金额:" + donate);
- }
- function onGrid1DataLoad() {
- var grid1 = F.ui.Grid1, sumFee1Total = 0, sumFee2Total = 0, sumDonateTotal = 0;
- grid1.getRowEls().each(function (index, tr) {
- var fee1Num = parseFloat(grid1.getCellValue(tr, 'colFee1'));
- sumFee1Total += (isNaN(fee1Num) ? 0 : fee1Num);
- var fee2Num = parseFloat(grid1.getCellValue(tr, 'colFee2'));
- sumFee2Total += (isNaN(fee2Num) ? 0 : fee2Num);
- var donateMoney = parseFloat(grid1.getCellValue(tr, 'colDonate'));
- sumDonateTotal += (isNaN(donateMoney) ? 0 : donateMoney);
- });
- grid1.updateSummaryCellValue('colName', '合计', true);
- grid1.updateSummaryCellValue('colFee1', sumFee1Total, true);
- grid1.updateSummaryCellValue('colFee2', sumFee2Total, true);
- grid1.updateSummaryCellValue('colDonate', sumDonateTotal, true);
- }
复制代码
你的代码中用 updateSummaryCellValue 来更新隐藏合计列的值,而这个地方有BUG,下个版本我们会修正,多谢指出:
-修正表格无法更新隐藏列合计行的问题(SNYG-9919)。 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|