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

来源:互联网 发布:淘宝用户名是什么 编辑:程序博客网 时间:2024/05/16 19:01
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);
    }

}// -->
原创粉丝点击