Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using checkedListBox

Status
Not open for further replies.

MDA

Technical User
Joined
Jan 16, 2001
Messages
243
Location
US
Hi all,

Could someone help me with setting all items in the checklistbox control set to CHECKED.

The control is populated by a SQLDB query but I have appended one line in the control called ALL. So when I click the ALL box, I want all the rows to be checked.

Thanks for any help.

MDA
 
I figured this one out and thought I would post the answer to my quetion, in case anyone else needed it.

Dim i As Integer
For i = 0 To lstCompany.Items.Count - 1
lstCompany.SetItemCheckState(i, CheckState.Checked)
Next

Thanks,
MDA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top