views:

18

answers:

1

Ive searched everywhere for this but cant find the answer. I have used the following code before to change repeated items properties in an asp.net repeater as after they have been bound to do things i couldnt do prior to binding them.

    protected void rowRepeater_ItemBound(object sender, RepeaterItemEventArgs e)
    {
       foreach (RepeaterItem item in rptStockists.Items)
        {
        }
    }

Now i am wanting to do something similar but with a chekbox list. i want to change the colour of the labels and i know i can only do this after the list has been bound. I have notice checkboxlists only provide the parameter OnDataBound in intellisense, doesnt give me OnItemDataBound that repeaters do. What would be the equivalent i could use here?

A: 

Well, you can use that DataBound event like:

protected void cbl_DataBound(object sender, EventArgs e)
{
    foreach (ListItem item in cbl.Items)
    {

    }
}
Dan Dumitru
i realised this just after i posted. thanks anyway dan.
phil crowe