DataColChanged事件,写代码
If e.DataCol.name = "发出" Then
If e.DataRow.IsNull("发出") Then
If e.DataRow.IsNull("领入") Then
e.DataRow("发出与领入标示") = Nothing
Else
e.DataRow("发出与领入标示") = "领入"
End If
Else
If e.newvalue < 0 Then
e.DataRow("发出") = e.OldValue
Else
e.DataRow("领入") = Nothing
e.DataRow("发出与领入标示") = "发出"
end if
End If
End If
If e.DataCol.name = "领入" Then
If e.DataRow.IsNull("领入") Then
If e.DataRow.IsNull("发出") Then
e.DataRow("发出与领入标示") = Nothing
Else
e.DataRow("发出与领入标示") = "发出"
End If
Else
If e.NewValue < 0 Then
e.DataRow("领入") = e.OldValue
Else
e.DataRow("发出") = Nothing
e.DataRow("发出与领入标示") = "领入"
End If
End If
End If