1、在标题里显示几人,如:vr.Text = dr("宿舍") & "(" & DataTables("住宿数据").compute("count(学生姓名)","宿舍='" & dr("宿舍") & "'") & "人)" '设置标题
Dim lvw As WinForm.ListView = e.Form.Controls("ListView1")
Dim vr As WinForm.ListViewRow = lvw.Current '获取ListView的当前行
If vr Is Nothing Then '如果不存在当前行,也就是内有选定任何一行
Return
End If
Dim dr As DataRow = vr.tag '获取此行对应的DataRow
tables("下表").filter = "宿舍='" & dr("宿舍") & "'")