更新时间:2023-12-04 10:08:46
添加这样的内容.
Add like this.
lstLicense.Items.Insert(16, (objDataReader("Division")).ToString)
我遇到1个错误"Items不是" System.Windows.Forms.ListViewItem"的成员.
实际上我想要显示在column16上,但记录是水平重复的
i have 1 error ''Items is not a member of ''System.Windows.Forms.ListViewItem''.
actually i want is to display at column16 but the record is repeating horizontally
我正在尝试在listview中搜索,并且我正在使用column16来填充objdatareader试图记录的部门名称的记录读取column15这是每行的部门ID,现在我要确定的是识别列15以了解部门名称
i am trying to search in listview and i am using column16 to populate the record for the department name the objdatareader is trying to read column15 it''s a deparment id for each row, now all i want is to identify column 15 to know the department name
<pre lang="vb">
Dim v As Integer
Dim aa As ListViewItem
lstCostCenter.Items.Clear()
Dim strSQL As String
For Each item2 As ListViewItem In lstLicense.Items
strSQL = "SELECT * FROM tblEndUserDetails WHERE CostCenter Like '" & item2.SubItems(15).Text & "%'"
classLibrary = New ConLib
classLibrary.openConnection(strConnection)
lblconstat.Text = DatabaseStatus
If Not classLibrary.isconnectionopen() Then
Exit Sub
End If
classLibrary.initializeCommand(strSQL)
populateDatAddCostCenterPopUpBox3()
Next