是为了更新后台所有的数据,用了下面的代码在dataColchanged事件中,重置列,只有加载的更新数据了,没加载的数据还是没变
If e.DataCol.Name = "供应商ID" Then
If e.NewValue Is Nothing Then
e.DataRow("供应商") = Nothing
Else
Dim gym As DataRow = e.DataRow
Dim gyl As DataRow
gyl = DataTables("目录").SQLFind("[供应商ID] = '" & e.NewValue & "'")
If gyl IsNot Nothing Then
gym("供应商") = gyl("供应商名称")
Else
gym("供应商") = "无记录"
End If
End If
End If