其实获取行的位置没有什么用,因为这个位置是会变的。比如加载的数据行数不一样,位置可能会不一样;按某列排序了,这个位置也会变
通过 _Identify 可以实现定位行
Dim dr As DataRow
dr = DataTables("表A").Find("[_Identify] >= " & e.DataRow("_Identify"))
If dr IsNot Nothing Then
Dim wz As Integer = Tables("表A").FindRow(dr)
If wz >= 0 Then
Tables("表A").Position = wz
End If
End If
这个用法不对。不用那么复杂
Dim wz As Integer = Tables("表A").FindRow(e.DataRow)
If wz >= 0 Then
Tables("表A").Position = wz
End If