title: Flex 3 Using an ArrayCollection to Populate Both a Datagrid and a ComboBox
body: <p>I use this arrayCollection to populate a Flex 3 Datagrid. I'd also like to use this arrayCollection to populate a comboBox with the Name node. </p>
  
  <p>In the arrayCollection, I've got the Name listed twice. I've got two rows in the Datagrid.</p>
  
  <p>If I set the ComboBox's labelfield to Name, then the Name will be listed twice in the ComboBox menu. Is there a way to use this arrayCollection and have each Name listed only once in the comboBox? </p>
  
  <p>I can always make another loop and array collection for the Name, but I was wondering if there were a better way.</p>
  
  <pre><code>    var i:uint; 
      for (i=0; i&lt;myArray.length; i++){
          myDGArray = [
           {Name: myArray[i].Name, Subject: 'Math:', Pass: myArray[i].math_pass, Fail: myArray[i].math_fail},
           {Name: myArray[i].Name, Subject: 'Reading:', Pass: myArray[i].reading_pass, Fail: myArray[i].reading_fail}
                               ]
                  }
  
  myAC=new ArrayCollection(myDGArray);
  </code></pre>
  
  <p>Thank you.</p>
  
  <p>-Laxmidi</p>