可以写到子表的datacolchanged事件
If e.DataCol.name = "日期" Then
Dim pr As DataRow = e.DataRow.GetParentRow("父表")
If pr IsNot Nothing Then
Dim crs As List(of DataRow) = pr.GetChildRows("子表")
Dim cnt As Integer
Dim maxDate As Date
For Each cr As DataRow In crs
If cr.IsNull("日期") Then
Exit For
End If
If maxDate < cr("日期") Then maxDate = cr("日期")
cnt = cnt + 1
Next
If crs.Count = cnt Then
pr("日期") = maxDate
Else
pr("日期") = Nothing
End If
End If
End If