title: Flex DataGrid with ComboBox itemRenderer
body: <p>I'm going spare trying to figure out the "correct" way to embed a ComboBox inside a Flex (3.4) DataGrid. By Rights (e.g. according to this page <a href="http://blog.flexmonkeypatches.com/2008/02/18/simple-datagrid-combobox-as-item-editor-example/" rel="noreferrer">http://blog.flexmonkeypatches.com/2008/02/18/simple-datagrid-combobox-as-item-editor-example/</a>) it should be easy, but I can't for the life of me make this work.</p>
  
  <p>The difference I have to the example linked above is that my display value (what the user sees) is different to the id value I want to select on and store in my data provider.</p>
  
  <p>So what I have is:</p>
  
  <pre><code>&lt;mx:DataGridColumn headerText="Type" width="200" dataField="TransactionTypeID" editorDataField="value" textAlign="center" editable="true" rendererIsEditor="true"&gt;
      &lt;mx:itemRenderer&gt;
          &lt;mx:Component&gt;
              &lt;mx:ComboBox dataProvider="{parentDocument.transactionTypesData}"/&gt;
          &lt;/mx:Component&gt;
      &lt;/mx:itemRenderer&gt;
  &lt;/mx:DataGridColumn&gt;
  </code></pre>
  
  <p>Where <code>transactionTypesData</code> has both 'data' and 'label' fields (as per what the <code>ComboBox</code> - why on earth it doesn't provide both a labelField and idField I'll never know).</p>
  
  <p>Anyway, the above MXML code doesn't work in two ways:</p>
  
  <ol>
  <li>The combo box does not show up with any selected item.</li>
  <li>After selecting an item, it does not store back that selected item to the datastore.</li>
  </ol>
  
  <p>So, has anyone got a similar situation working?</p>