子表DataColChanging事件
If e.DataCol.Name = "第一列" AndAlso e.NewValue <> Nothing Then
If e.DataRow.GetParentRow("表A") Is Nothing Then
msgbox("没有父编码")
e.Cancel = True
End If