CheckedListBox control

How all items in the CheckedListBox control in .NET 4.0 can be checked/unchecked?

E

Expert

Verified

Following code can be used to check all the items in .NET:

Code for VB:

Dim i as Integer

For i = 0 To myCheckedListBox.Items.Count - 1

myCheckedListBox.SetItemChecked(i, True)

Next

Code for C#:
for( int i = 0; i < myCheckedListBox.Items.Count; i++ )
{
 myCheckedListBox.SetItemChecked(i, true);
}

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.