4 Replies Latest reply on Aug 11, 2008 11:33 AM by Newsgroup_User

    Bind to ArrayCollection outside of item editor

    anoweb
      I have something like:

      <mx:Panel>

      <mx:Array id="fields">
      <mx:String>A</mx:String>
      <mx:String>B</mx:String>
      <mx:String>C</mx:String>
      </mx:Array>

      <mx:DataGrid ...>
      <mx:DataGridColumn ...>

      <mx:itemEditor>
      <mx:Component>
      <mx:ComboBox dataProvider="{fields}" />
      </mx:Component>
      </mx:itemEditor>

      </mx:DataGridColumn>
      </mx:DataGrid>

      I can't bind the combobox to "fields" because it can't see it, how can I do this without replicating the array "fields"? I use "fields" elsewhere in this component so I can't just move it into the combobox area.