0 Replies Latest reply on Aug 7, 2007 8:41 PM by jShow

    List control selectedIndices nightmare

    jShow
      Hi there, another NOOB in need of help. I have a dataProvider that successfully populates the List control, but I can not get an array converted from a string (the string is: 0,1) selected from a DataGrid cell to show up as the selectedIndices of the List control. Only the 0 index is selected. I've included the code relevant to my problem (I think). I know the solution must be really simple, so hopefully someone won't mind lending me a hand. THANKS!


      import mx.utils.ArrayUtil;

      [Bindable]
      public var selectedPeopleTypes:Array;

      public function getSelectedPeopleTypes():void {
      selectedPeopleTypes = ArrayUtil.toArray(dgPeopleRequest.selectedItem.p_type_id);
      }

      <mx:List id="selected_p_type_id" dataProvider="{getPeopleTypesProvider}" labelField="p_type_name" allowMultipleSelection="true" selectedIndices="selectedPeopleTypes" />