请问,多列添加的话,是这样写代码代码?
If e.DataCol.name="第一列" AndAlso e. DataRow.isnull("第一列")=False Then
Dim dr As DataRow = DataTables("表B").Find("ID = " & e.DataRow("_Identify"))
If dr Is Nothing Then
dr = DataTables("表B").addnew
dr("ID") = e.DataRow("_Identify")
dr("第一列")=e.DataRow("第一列")
End If
dr("第一列")=e.DataRow("第一列")
End If
If e.DataCol.name="第二列" AndAlso e. DataRow.isnull("第二列")=False Then
Dim dr As DataRow = DataTables("表B").Find("ID = " & e.DataRow("_Identify"))
If dr Is Nothing Then
dr = DataTables("表B").addnew
dr("ID") = e.DataRow("_Identify")
dr("第二列")=e.DataRow("第二列")
End If
dr("第二列")=e.DataRow("第二列")
End If
......
还是说有简单的方式,BIN老师说的多一行代码是咋写呢?请指教,谢谢。
[此贴子已经被作者于2014-2-21 9:11:36编辑过]