I have dynamic checkboxes in a Repeater.

I want to create a button for Select All and Clear All that will select each 
checkbox and clear each checkbox respectively.

I'm hitting a wall.

Here's the checkbox code:

<mx:Button id="subCatButtonSelect" label="Select All" click="selectAll();" />

<mx:Repeater id="subCategoryPickerList">
<mx:CheckBox id="subCategoryCheckbox" 
data="{subCategoryPickerList.currentItem.subCategoryID}" 
label="{subCategoryPickerList.currentItem.name}" width="175" />
</mx:Repeater>

Here's what I have for Select All, which is currently not working:

private function selectAll():void {
var idx:int;
var len:int = subCategory.length;
for (idx=0; idx<len; idx++) {
subCategoryCheckbox[idx].selected = true;
}
}

"subCategory" is an ArrayCollection supplying the data for each checkbox.

All help is appreciated! Thanks so much! 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:5490
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to