DataColChanging事件里,也已经修正了。
Dim dc As DataCol = e.DataCol
Dim dr As DataRow = e.DataRow
If dc.Name = "开piao日期" OrElse dc.Name = "付款期限" Then
If dr.IsNull("开piao日期") OrElse dr.IsNull("付款期限") Then
dr("到期日期") = Nothing
Else
dr("到期日期") = dr("开piao日期").AddDays(dr("付款期限"))
End If