Check/uncheck item in CheckedListBox DOT NET

In what way we can check/uncheck every item in a CheckedListBox control in the .NET 4.0 framework?

E

Expert

Verified

To check every item in .NET framework, we can use the code which is shown below:

Code written in C#:

for( int i = 0; i < myCheckedListBox.Items.Count; i++ )

{

 myCheckedListBox.SetItemChecked(i, true);

}

Code written in VB:

Dim i as Integer

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

myCheckedListBox.SetItemChecked(i, True)

Next

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.