RKCY
RKCY

Reputation: 4135

select the viewstack container id based on select field in comboBox in flex

I have a comboBox and values like basic and advanced. And viewstack container conatains 2 grids.

When i select the base option in Combobox, the first grid has to be selected. select the advanced value in comboBox, the second grid has to be selected.

Please chck my below code and help me how to do it.

<mx:ViewStack id="viewstack1" width="95%" height="85%" x="0" y="63" >       
                        <tables:KeyMetricsBasicTable basicArrayDataProvider="{basicArrayResult1}" width="100%" height="100%"/>

    <tables:KeyMetricsAdvTable advArrayDataProvider="{advArrayResult1}" width="100%" height="100%"/>
    </mx:ViewStack> 

Thanks, Ravi

Upvotes: 0

Views: 256

Answers (1)

JeffryHouser
JeffryHouser

Reputation: 39408

Something like this:

<mx:ComboBox id="comboBox" change="{viewstack1.selectedIndex = comboBox.selectedIndex}" />

Upvotes: 1

Related Questions