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