你用的是datalist,现在已经过时了。
Dim dst As WinForm.DataList = e.Form.Controls("DataList1") Dim dr as DataRow = dst.Current '获得选定行 If dr Is Nothing Then Return End If Dim Index As Integer = Tables("表A").FindRow(dr) '获得选定行在Tables("订单")中的位置 If Index >=0 Then '如果选定行在Tables("订单")中存在 Tables("表A").Position = Index '定位到选定行 End If
|