Click here to Skip to main content
15,886,857 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all,
I have a checkedlistbox with some items..
When I click a button, the items which are checked should be unchecked.
Posted
Updated 10-Apr-10 20:24pm

Are you looking for a sample?
Then search the internet - I found a sample here.
 
Share this answer
 
Maybe this helps:

VB
Dim I As Integer
For I = 0 To CheckedListBox1.Items.Count - 1
    If CheckedListBox1.Items(I).IndexOf("Whatever You Are Looking For") <> -1 Then
        CheckedListBox1.SetItemChecked(I, True)
    End If
Next


Or use the ChecktIndices propery like this(I know it's C# but it's the same):

C#
foreach (var item in checkedListBox1.CheckedIndices)
            {
                checkedListBox1.SetItemChecked((int)item, false);
            }
 
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