嗯 不是这段代码的问题是 另外一段的问题 狐爸 看下能解决吗?
有8个表要同步显示 状态的内容 所以当重置订单加入日期列的时候 状态列发生了变化 执行下面这段代码的时候影响了速度..
If e.DataCol.Name = "状态"
Dim Filter As String = "[编号] = '" & e.DataRow("编号") & "'"
Dim drs As List(Of DataRow) = DataTables("A").Select(Filter)
Dim drs1 As List(Of DataRow) = DataTables("B").Select(Filter)
Dim drs2 As List(Of DataRow) = DataTables("C").Select(Filter)
Dim drs3 As List(Of DataRow) = DataTables("D").Select(Filter)
Dim drs4 As List(Of DataRow) = DataTables("E").Select(Filter)
Dim drs5 As List(Of DataRow) = DataTables("F").Select(Filter)
Dim drs6 As List(Of DataRow) = DataTables("G").Select(Filter)
Dim drs7 As List(Of DataRow) = DataTables("H").Select(Filter)
Dim drs8 As List(Of DataRow) = DataTables("I").Select(Filter)
For Each dr As DataRow In drs
dr("状态") = e.DataRow("状态")
Next
For Each dr1 As DataRow In drs1
dr1("状态") = e.DataRow("状态")
Next
For Each dr2 As DataRow In drs2
dr2("状态") = e.DataRow("状态")
Next
For Each dr3 As DataRow In drs3
dr3("状态") = e.DataRow("状态")
Next
For Each dr4 As DataRow In drs4
dr4("状态") = e.DataRow("状态")
Next
For Each dr5 As DataRow In drs5
dr5("状态") = e.DataRow("状态")
Next
For Each dr6 As DataRow In drs6
dr6("状态") = e.DataRow("状态")
Next
For Each dr7 As DataRow In drs7
dr7("状态") = e.DataRow("状态")
Next
For Each dr8 As DataRow In drs8
dr8("状态") = e.DataRow("状态")
Next
End If