DataColChanged事件
Select Case e.DataCol.Name
Case "日期A"
If e.DataRow.IsNull("日期A") Then
e.DataRow("日期B") = Nothing
Else
Dim d As Date = e.DataRow("日期A")
If d.Day = 1 Then
e.DataRow("日期B") = new Date(d.Year,d.Month,Date.DaysInMonth(d.Year,d.Month))
Else
e.DataRow("日期B") = d.AddMonths(1)
End If
End If
End Select