If e.Table.Current Is Nothing Then '如果Current为Nothing Return '则返回 End If Dim wz As Integer Dim dr As DataRow dr = Tables("窗口1_Table1").DataTable.Find("[menuid] = '" & e.Table.Current("menuid") & "'") If dr IsNot Nothing Then wz = Tables("窗口1_Table1").FindRow(dr) If wz >= 0 Then Tables("窗口1_Table1").Position = wz End If End If