DataColChanged事件
If e.DataCol.name = "离岗时间" OrElse e.DataCol.name = "员工姓名" Then
If e.DataRow.IsNull("员工姓名") Then
e.DataRow("在岗状况") = Nothing
e.DataRow("离岗时间") = Nothing
Else
If e.DataRow.IsNull("离岗时间") Then
e.DataRow("在岗状况") = "在岗"
Else
e.DataRow("在岗状况") = "离岗"
End If
End If
End If