0 Replies Latest reply on Jan 9, 2007 12:12 PM by 187_2007

    ComboBox in a DataGrid

    187_2007 Level 1
      I know that this has been spoken about but there does not seem to be a solution that I understand correctly. Here is what I have:

      Items.Mxml
      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml" width="400" height="300">
      <mx:ComboBox id="cBox" selectedItem="{data.State}">
      <mx:dataProvider>
      <mx:String>AL</mx:String>
      <mx:String>AK</mx:String>
      <mx:String>AR</mx:String>
      <mx:String>CA</mx:String>
      <mx:String>MA</mx:String>
      </mx:dataProvider>
      </mx:ComboBox>
      </mx:VBox>



      FlextoCFC.mxml

      <mx:DataGrid x="322" y="124" dataProvider="{mygrid}" id="myGrid" editable="true">
      <mx:columns>
      <mx:DataGridColumn headerText="Name" dataField="NAME" itemEditor="valueObjects.Items "/>
      </mx:columns>
      </mx:DataGrid>


      So this may not need to be said... But I am trying to put this Combobox into the Grid... Well, the combo box is there and it looks pretty, but when I click on it I don't get what I want. Instead the ComboBox is populated with:

      Text1931
      Text1932
      Text1933
      Text1934
      Text1935

      When I click on the CombooBox column I get this error:

      ReferenceError: Error #1069: Property text not found on valueObjects.Items and there is no default value.

      How do I get the correct ComboBox values into the grid that I have and why am I getting this error?