-- 作者:lsy
-- 发布时间:2013/6/6 13:45:00
--
只好变通啦:
(打折后金额列不用表达式)
DataColChanged
If e.DataCol.Name = "原价" OrElse e.DataCol.Name = "折扣" Then If e.DataRow.IsNull("原价") = False AndAlso e.DataRow.IsNull("折扣") = False Then Dim s As String = CStr(e.DataRow("原价")*e.DataRow("折扣")) Dim s1 As String Dim i As Integer = Instr(s,".") s1 = s.SubString(0,i) s = s1 & Left(s.SubString(i),2) e.DataRow("打折后金额") = CDbl(s) End If End If
[此贴子已经被作者于2013-6-6 13:57:02编辑过]
|