DataColChanged事件,写代码
Dim dr As DataRow = e.DataRowIf dc.Name = "起始日期" Then If dr.IsNull("起始日期") Then dr("下次检查") = Nothing dr("预产期") = Nothing Else dr("下次检查") = dr("起始日期").AddDays(20) dr("预产期") = dr("起始日期").AddDays(114) End IfEnd If