2 Replies Latest reply on Sep 15, 2010 9:05 AM by laxmidi

    Setting the Default Selection on a List

    laxmidi Level 1

      Hi,

       

      I've got a list and the selectedIndex doesn't seem to have any effect.

       

      I posted this question on Stack Overflow, but I didn't get a reply.

       

      I've got a panel with this list and a few radio buttons. I've set the defaults on the radio buttons, but I'm having problems setting 2010 as the default selection in the list.

       

      <mx:List  
      
          id="myList" 
              width="120" 
              height="80"
              alternatingItemColors="[0xFFFFFF, 0xEEEEEE]"
              selectedIndex="0">
      
           <mx:dataProvider>
                  <mx:Object label="2010" data="myData1" />
                  <mx:Object label="2009" data="myData2" />
                  <mx:Object label="2008" data="myData3" />
           </mx:dataProvider>
      
      <mx:List> 
      

       

      Any suggestions? Thank you.

       

      -Laxmidi