请教老师,下面代码能实现父表和子表时间输入的提醒,如果非关联的表之间的时间提醒,应该怎样写
If e.DataCol.Name = "计划开始时间" AndAlso e.NewValue <> Nothing Then '不能小于计划开始时间
Dim pr As DataRow = e.DataRow.GetParentRow("项目总策划")
If e.NewValue < pr("计划开始时间")
Messagebox.Show("此处时间 不能小于项目总策划的 计划开始时间","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.DataRow("计划开始时间") = Nothing
e.cancel = True
End If
End If