How To Hide Listview Rows vbnet

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<pre class="prettyprint lang-vb PayList form sSql = "SELECT FullName ,InvNomer, date,BalanceDue FROM Invoice"
With LvList
.Columns.Add("Name", 150)
.Columns.Add("InvNomer", 90)
.Columns.Add("Date", 90)
.Columns.Add("Balance", 70)
FillListView(LvList, GetData(sSql)) [/code]
After I ADD To my Payment Datagridview
Payment Form
With InvNomer in DGV.Rows(i).Cells(1).Value
<pre class="prettyprint lang-vb DGV.Columns.Add("FullName", "Name")
DGV.Columns.Add("InvNomer", "InvNomer")
DGV.Columns.Add("Date", "Date")
DGV.Columns.Add("BalanceDue", "Total")
[/code]
Now Help me to hide my Paylist row with InvNomer where InvNomer in Payment.DGV.rows(i).cell(1).value
I Have tried
<pre class="prettyprint Private Sub cmdPaylist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPaylist.Click
If pbNew Then
Dim AllItems As String = ""
For i As Integer = 0 To DGV.Rows.Count - 1
For Itm = 0 To PayList.LvList1.Items.Count - 1
AllItems = AllItems & PayList.LvList1.Items.Item(Itm).Text & vbNewLine
AllItems = AllItems.Trim
With PayList.LvList1
Dim lvItem1 As String = DGV.Rows(i).Cells(1).Value
If Val(.Items(Itm).SubItems(1).Text) = lvItem1 Then
.Items(Itm).Remove()
End If
End With
Next
Next
PayList.Show()
PayList.pbNew = True
End If
End Sub[/code]
But cannot work
Can anyone know how to hide Listview rows
Please Help
LearnVbnet




View the full article
 
Back
Top