Checked List Box in Vb.net

Ujjwalvb

New member
Joined
Feb 24, 2006
Messages
2
Programming Experience
Beginner
Hello
Any body tell me how to add the items in the checked list box From the Database.



Ujjwal
 
same as all other list controls (listbox, listView, comboBox ...)

possible solution:
VB.NET:
conn.Open()
strSQL = "SELECT anItem FROM myTable"
{...}
cmd.ExecuteReader
 
[COLOR=blue]While[/COLOR] objread.read
[SIZE=2][COLOR=#0000ff]   Me[/COLOR][/SIZE][SIZE=2].CheckedListBox1.Items.Add(objread("anItem"))
[/SIZE][COLOR=blue]End While[/COLOR]

HTH
Regards ;)
 
Back
Top