Hello @ all,
I want to select a specific part with selectedIndex. But it dont works :( It 
selects all the time the first one in the list.

Can someone give me a help? There its the code... 

Thanks Michael

Code:
<mx:Script>
        <![CDATA[
                import mx.controls.Alert;
        import mx.collections.ArrayCollection;
                                                
        [Bindable]
        public var initSubjectableList:ArrayCollection = new ArrayCollection();
        public var licenceID:String;
                                                
        private function getSubjectDataList(evt:ResultEvent):void {
                var count:Number = 0;
                var _data:Array;
                var _data2:Array;
                                
                for( count = 0; count < evt.result.id.length; count++)
                {
                                //create array for drop down
                                _data = [{ID: evt.result.id[count], label: 
evt.result.name[count]}];
                                _data2 = _data.concat(_data2);
                                initSubjectableList = new 
ArrayCollection(_data2);
                                                
                                if(evt.result.id[count] == licenceID) {
                                        editLicence.selectedIndex = count;
                                                        
                                        mx.controls.Alert.show("ID");
                                        
mx.controls.Alert.show(evt.result.id[count]);   
                                }
                }
        }
                                
       ]]>
</mx:Script>

Reply via email to