在DataColChanged中写入代码,代码正常,但是在输入“飞行日期”列值时,不会触发事件,必须要通过重置列或DataTables("时间").DataCols("飞行日期").RaiseDataColChanged()才能触发事件,不知道为何?而其他在事件能正常触发(同一表中)
If e.DataCol.Name = "飞行日期"
Then
Dim nms() As String = { "PF" }
If e.NewValue Is Nothing Then
For Each nm As String In nms
e.DataRow(nm) = Nothing
Next
Else
Dim dr As DataRow = e.DataRow
Dim pr As DataRow
Dim filter As String
filter = " 飞行日期 = '"
& dr("飞行日期") & "'"
pr = DataTables("任务书").Find(filter)
If pr IsNot Nothing Then
dr("PF")
= pr("操纵")
End If
End
If
End If