I have a situation where I am using a data grid (flexicious), and when I select rows I want to enable/disable a pane below the grid. If i have 1 row selected I want it enabled, if I have 0, or more than 1 selected I want it disabled. The pane is intially disabled, and the enable works great 100% of the time. enabled="false" only works after I have selected three rows. If I have two rows selected I can prove I’m setting it to false, but it doesn’t take.
I’ve tried invalidateDisplayList, firing an event to set enabled="false" a second time. Nothing seems to work.
I am working in a Module if that makes any difference. If I set AlertInfoPanel.enabled=false, it doesn’t always work.
<mx:VBox>
<flexi:myGrid />
</mx:VBox>
<mx:VBox id="AlertInfoPanel" height="70%" width="100%" visible="{mAllowConfig}" includeInLayout="{mAllowConfig}" enabled="false" >
<mx:TabNavigator width="100%" height="100%" paddingTop="0" tabHeight="20" id="TAB_NAVIGATOR" >
<components:Tab1 label="{getToken('token_tab_general')}" id="generalInfoUI"/>
<components:Tab2 label="{getToken('token_tab_rules')}" />
</mx:TabNavigator>
</mx:VBox>
I finally figured it out. I need to call
AlertInfoPanel.validateNow().I don’t understand why it works sometimes, but the
validateNow()on the VBOX seems to work.