Friday, January 7, 2011

How can i check / uncheck items using SetItemChecked in checkboxlist

    // check items in checkboxlist
            for (int i = 0; i < checkedListBox1.Items.Count; i++)
            {
                checkedListBox1.SetItemChecked(i, true);
            }

            // uncheck items in checkboxlist
            for (int i = 0; i < checkedListBox1.Items.Count; i++)
            {
                checkedListBox1.SetItemChecked(i, false);
            }

No comments:

Post a Comment