This project has moved. For the latest updates, please go here.

CheckBoxList get items inside and select them

Jan 20, 2015 at 9:52 AM
Hello,

I want to make an CheckBoxList with a "Select All" Item, and when you click it every item in the CheckBoxList should get selected.
So I was wondering how you'd get all the items within a CheckBoxList and being able to make them Selected.
Jan 20, 2015 at 9:56 AM
Never mind,

this worked for me:
for (int i = 1; i < CheckBoxList.Items.Count; i++)
                {
                    CheckBoxList.SelectedItems.Add(CheckBoxList.Items[i]);
                }