以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  计算方式  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=34126)

--  作者:XYT
--  发布时间:2013/5/31 9:23:00
--  
你想要什么,能说具体点吗
--  作者:Bin
--  发布时间:2013/5/31 9:25:00
--  
上例子,需求描述清楚.这个很简单的. 
--  作者:夕然
--  发布时间:2013/5/31 9:37:00
--  

把以下代码写在表属性中,datacolchanged 中 

 

If e.DataCol.Name = "材质计量" Then 
    If e.DataRow("材质计量") ="立方"  Then
        e.
DataRow("xxx") = e.DataRow("xxx") * e.DataRow("xxx")*e.DataRow("xxx") 

    Elseif e.DataRow("材质计量") ="平方"  Then
    
    e.DataRow("xxx") = e.DataRow("长") * e.DataRow("宽")
        

    End
If
End
If