Reputation: 43
I have an arrayCollection with strings in them, is there some way I can databind a RadioButtonGroup to the array collection? As we can do for combo boxes
var cBox:ComboBox = new ComboBox();
cBox.dataProvider = arrayCollection;
There is no RadioButtonGroup.dataprovider property. I know this has to be done manually, what is the most efficient way to do this?
Upvotes: 1
Views: 874
Reputation: 3119
Or use a Repeater for the RadioButtons, all part of the same group.
Upvotes: 0
Reputation: 4340
you will need to manually create and add the radio buttons to your container ( with AS3 ) .
for each(var itemStr:String in array)
{
var rb:RadioButton = new RadioButton();
rb.id = itemStr;
rb.label = itemStr;
container.addChild(rb);
}
Upvotes: 1