PDA

View Full Version : Set ID inside a repeater


hans130
12-15-2007, 07:21 PM
I have a ToggleButtonBar inside a Repeater.

I will change they selectedIndex from they togglebuttonbar from a function.

How can I do this.
How can I give they togglebuttonbar a ID inside they repeater so I can select they correct togglebuttonbar?

I have already tested rp.currentItem or a value of they repeater. But I recieve a error that this isn't allowed.

thanks

shubs6
12-17-2007, 05:12 AM
Though Flex will assign an ID to each created ToggleButtonBar at runtime you might not be able to use that coz it'll change at every run. currentItem and currentIndex should solve your problem. Can you give your piece of code of repeater and ToggleButtonBar. I should be able to understand it better.

hans130
12-17-2007, 09:35 AM
found:

when you set a ID Thermostaten within a repeater you can use

Thermostaten[2].selectedIndex=2 to change they selected index