您的位置:首页 > 其它

客户端实现在UltraWebGrid中对某行数据进行自动计算

2008-01-02 21:21 656 查看
function UltraWebGrid1_AfterCellUpdate(gridName, cellId){
//Add code to handle your event here.

var oRow=igtbl_getActiveRow(gridName);

var col = igtbl_getColumnById(cellId)
if (col.Key=="Quantity"||col.Key=="Price"||col.Key=="TaxRate")
{
Quantity = oRow.getCellFromKey("Quantity").getValue();
Price = oRow.getCellFromKey("Price").getValue();
TaxRate = oRow.getCellFromKey("TaxRate").getValue();
if (Quantity==null) Quantity = 0;
if (Price==null) Price = 0;
if (TaxRate==null) TaxRate = 0 ;
oRow.getCellFromKey("Amount").setValue(Quantity*Price*(100+TaxRate)/100);
}

}// -->
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: