Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello how do to the value in column viewed is 1 or 0 to load the listview for example if it is 0 then item will not load but is value it 1 i displayed in the lists view ?


Sub showData()

ds = New DataSet
da = New MySqlDataAdapter("Select * from tblinfo", sqlcon)
da.Fill(ds, "tblinfo")
da = New MySqlDataAdapter("Select * from users", sqlcon)
da.Fill(ds, "users")

If ds.Tables("tblinfo").Rows.Count > 0 Then
For i As Integer = 0 To ds.Tables("tblinfo").Rows.Count = 1
With lvDisplay.Items.Add(ds.Tables("tblinfo").Rows(i).Item(0).ToString)

End With

End If

End Sub
[no name] 16-Aug-14 15:10pm    
See comment to the "question" you deleted.

1 solution

If you have view column in your table then you can use where condition to filter and display in list view. just use:
where view = 1
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900