How To Hide Listview Rows vbnet

  • Thread starter Thread starter LearnVBnet
  • Start date Start date
L

LearnVBnet

Guest
' 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))


After I ADD To my Payment Datagridview

Payment Form

With InvNomer in DGV.Rows(i).Cells(1).Value

DGV.Columns.Add("FullName", "Name")
DGV.Columns.Add("InvNomer", "InvNomer")
DGV.Columns.Add("Date", "Date")
DGV.Columns.Add("BalanceDue", "Total")


Now Help me to hide my Paylist row with InvNomer where InvNomer in Payment.DGV.rows(i).cell(1).value

I Have tried

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

But cannot work

Can anyone know how to hide Listview rows

Please Help

LearnVbnet

Continue reading...
 
Back
Top