If e.DataCol.name="发货" AndAlso e.DataRow.GetParentRow("表A") IsNot Nothing Then Dim rlist As List(of DataRow)=e.DataTable.Select("A='" & e.DataRow("A") & "' and 发货=true") If rlist.count=e.DataTable.Select("A='" & e.DataRow("A") &"'").count Then e.DataRow.GetParentRow("表A")("全发货")=True Else e.DataRow.GetParentRow("表A")("全发货")=False End If End If